|
|
@@ -167,6 +167,11 @@
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true">
|
|
|
+ <view class="tui-title">采购人</view>
|
|
|
+ <view @click="changeCgStaff()">{{ productData.cgStaffName?productData.cgStaffName:'未设置' }}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<view class="module-com input-line-wrap goods-wrap">
|
|
|
@@ -301,7 +306,9 @@
|
|
|
<view style="width:100vw;margin-top:8upx;" v-if="productData.delStatus == 1"><button @click="changeDelStatus(productData,0)">取消删除</button></view>
|
|
|
<view style="width:100vw;margin-top:30upx;"><button @click="closeMoreDoPop()">取消</button></view>
|
|
|
</view>
|
|
|
- </uni-popup> <modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="损耗数量" padding="30rpx 30rpx" >
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="损耗数量" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line">
|
|
|
@@ -311,14 +318,28 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </modal-module> </view>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
+ <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="max-height:90vh;overflow: scroll;">
|
|
|
+ <view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
|
|
|
+ <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+ <view v-for="(item, index) in staffData" :key="index" @tap.stop="getStaff(item)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
+ <view style="margin-top:8upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;font-weight:bold;font-size:30upx;">{{item.name}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="cancelStaff()">取消选择</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
const form = require("@/utils/formValidation.js");
|
|
|
import { getAllItemClass } from "@/api/item-class";
|
|
|
-import { applyAuth } from '@/api/item';
|
|
|
+import { applyAuth,modifyCgStaff } from '@/api/item';
|
|
|
import { delCpItem,addCpItem } from '@/api/cp'
|
|
|
import { getAllUnit } from "@/api/unit";
|
|
|
import { addProduct,updateProduct,getProductDetail,py,print,modifyOnStockFn,delStatusUpdate,changeBelongCost } from "@/api/product";
|
|
|
@@ -328,6 +349,7 @@ import { mapGetters } from "vuex"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
+import { getAllStaff } from "@/api/shop-admin";
|
|
|
export default {
|
|
|
name: "item-detail",
|
|
|
components: {
|
|
|
@@ -391,7 +413,8 @@ export default {
|
|
|
backCpInfo:{cpId:0,cpName:'',needUpdate:0}, wasteNum:'',
|
|
|
wasteShow:false,
|
|
|
wasteFocus:false,
|
|
|
- belongCost:0
|
|
|
+ belongCost:0,
|
|
|
+ staffData:[]
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
@@ -410,6 +433,12 @@ export default {
|
|
|
prevPage.$vm.onShowRefresh = 1
|
|
|
prevPage.$vm.hasRequest = 0
|
|
|
|
|
|
+ getAllStaff().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.staffData = res.data.list ? res.data.list : []
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
onShow(){
|
|
|
let that = this
|
|
|
@@ -437,6 +466,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getStaff(staff){
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ modifyCgStaff({id:this.productData.id,staffId:staff.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ this.getDetail()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancelStaff(){
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ },
|
|
|
+ changeCgStaff(){
|
|
|
+ this.$refs.staffRef.open('center')
|
|
|
+ },
|
|
|
delOneCp(info,index){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认删除'+info.cpName+'?'},() => {
|