ymy vor 1 Jahr
Ursprung
Commit
b6d4169bfe

+ 0 - 1
src/benyun/components/byTable/byTable.vue

@@ -150,7 +150,6 @@ export default class ByTable extends VueViews {
     pageSize: 20, //每页条数
     total: 0 //总条数
   }
-
   get columns(){
     return this.config?.columns ? this.config.columns : [];
   }

+ 12 - 6
src/benyun/components/moduleView/moduleView.vue

@@ -9,7 +9,7 @@
   >
     <transition name="el-zoom-in-top">
       <div class="search" v-if="searchConfig" v-show="!hideSearch">
-        <by-form :propConfig="searchConfig" :ref="searchID"></by-form>
+        <by-form :propConfig="searchConfig" class="form-view" :ref="searchID"></by-form>
         <div class="search-btn">
           <el-button type="primary" size="small" icon="el-icon-search" @click="search">搜索</el-button>
           <el-button size="small" icon="el-icon-refresh" @click="resert">重置</el-button>
@@ -110,11 +110,11 @@ export default class ModuleView extends ModuleViewHandle {
     if(this.$refs[this.searchID] && !this.hideSearch){
       fHeight = (this.$refs[this.searchID] as any).$el.offsetHeight + 32 + 8;
     }
-    if(this.$refs[this.toolID]){
-      tHeight = (this.$refs[this.toolID] as any).$el.offsetHeight + 16;
-    }
+    // if(this.$refs[this.toolID]){
+    //   tHeight = (this.$refs[this.toolID] as any).$el.offsetHeight + 16;
+    // }
     if(this.config.table && vHeight > 0){
-      const h = vHeight - 32 - fHeight - tHeight - 48;
+      const h = vHeight - 32 - fHeight - 48;
       this.config.table.attr.height = h;
       if(this.$refs[this.tableID]){
         (this.$refs[this.tableID] as any).recalculate();
@@ -256,9 +256,15 @@ export default class ModuleView extends ModuleViewHandle {
   .search{
     width: 100%;
     padding-bottom: 8px;
-    .search-btn{
+    display: flex;
+    align-items: center;
+    .form-view{
       width: 100%;
+    }
+    .search-btn{
+      width: 120px;
       display: flex;
+      flex-shrink: 0;
       justify-content: flex-end;
     }
   }

+ 1 - 1
src/views/audit/Information/index.vue

@@ -302,7 +302,7 @@
 			}).catch(() => {});
 		}
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.isShow = 'add'; // 展示类型
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });

+ 1 - 1
src/views/audit/agencyGoods/index.vue

@@ -388,7 +388,7 @@
 		}
 		// 打开编辑
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.popTitle = '编辑';
 			let loading = this.$loading({ target: '.main-container' });
 			api.single({ id: e.id }, 'maindataMaterialOrganizationCategory').then((res : any) => {

+ 1 - 1
src/views/audit/distributor/index.vue

@@ -513,7 +513,7 @@
 		}
 		// 打开编辑
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.isShow = 'add'; // 展示类型
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });

+ 1 - 1
src/views/audit/manufacturer/index.vue

@@ -535,7 +535,7 @@
 		}
 		// 打开编辑
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.isShow = 'add'; // 展示类型
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });

+ 3 - 3
src/views/audit/orderTask/index.vue

@@ -910,7 +910,7 @@
 						query.suborderList.splice(i, 1)
 					}
 				});
-				console.log('保存参数query ==> ', query);
+				// console.log('保存参数query ==> ', query);
 				let loading = this.$loading({ target: '.main-container' });
 				if (this.isAdd) {
 					api.saveList(query, 'supplyTaskOrder').then((res : any) => {
@@ -1164,8 +1164,8 @@
 				}).catch(() => this.$message.info('已取消提交'));
 			} else {
 				if (this.isAdd) return this.$message.warning('新增数据必须先保存才能提交');
-				console.log('isChange ==> ', this.isChange);
-				console.log('isSubmit ==> ', this.isSubmit);
+				// console.log('isChange ==> ', this.isChange);
+				// console.log('isSubmit ==> ', this.isSubmit);
 				if (this.isSubmit) {
 					this.$confirm('确定提交吗!', '注意', {
 						confirmButtonText: '确定',

+ 2 - 2
src/views/audit/outbound/index.vue

@@ -1284,8 +1284,8 @@
 				}).catch(() => this.$message.info('已取消提交'));
 			} else {
 				if (this.isAdd) return this.$message.warning('新增数据必须先保存才能提交');
-				console.log('isChange ==> ', this.isChange);
-				console.log('isSubmit ==> ', this.isSubmit);
+				// console.log('isChange ==> ', this.isChange);
+				// console.log('isSubmit ==> ', this.isSubmit);
 				if (this.isSubmit) {
 					this.$confirm('确定提交吗!', '注意', {
 						confirmButtonText: '确定',

+ 2 - 2
src/views/audit/productClassification/index.vue

@@ -278,7 +278,7 @@
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 				let query = (this as any).$refs.addFormId.getValue();
-				console.log('确认新增/编辑 ==> ', query);
+				// console.log('确认新增/编辑 ==> ', query);
 				query.status = this.radio;
 				this.dialogFormVisible = false;
 				if (this.popTitle === '新增') {
@@ -381,7 +381,7 @@
 		}
 		// 打开编辑
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });
 			api.single({ id: e.id }, 'maindataMaterialCategory').then((res : any) => {

+ 1 - 1
src/views/audit/productManagement/index.vue

@@ -1388,7 +1388,7 @@
 		}
 		// 打开编辑
 		getDetail(e : any) {
-			console.log('编辑 ==> ', e);
+			// console.log('编辑 ==> ', e);
 			(this as any).$refs.byTool.setTool({ return: true, save: true, delete: true });
 			let loading = this.$loading({ target: '.my-container' });
 			api.single({ id: e.id }, 'maindataMaterial').then((v : any) => {

+ 1 - 1
src/views/audit/saleOrder/index.vue

@@ -902,7 +902,7 @@
 		// 保存
 		onSave() {
 			let query = (this.$refs.bill as any).getBillFormValue(); // 获取单据数据
-			console.log('保存参数query ==> ', query);
+			// console.log('保存参数query ==> ', query);
 			let loading = this.$loading({ target: '.main-container' });
 			api.updateList(query, 'supplyPurchaseOrder').then((res : any) => {
 				loading.close();

+ 21 - 20
src/views/audit/store/components/batchbyOneModal.vue

@@ -18,8 +18,8 @@
         </el-pagination>
       </div>
       <deliveryGoodsInfo :hideOrderCode="true" @editState="editState" @editResult="editResult" @qtyChange="qtyChange" ref="info" />
-      <deliveryPrice :data="priceObj[data[currentOrder].omsOrderIds]" ref="price" v-if="data[currentOrder] && priceObj[data[currentOrder].omsOrderIds]" 
-      @prichChange="prichChange" :currentValue="currentPrice[data[currentOrder].omsOrderIds]" />
+      <!-- <deliveryPrice :data="priceObj[data[currentOrder].omsOrderIds]" ref="price" v-if="data[currentOrder] && priceObj[data[currentOrder].omsOrderIds]" 
+      @prichChange="prichChange" :currentValue="currentPrice[data[currentOrder].omsOrderIds]" /> -->
     </div>
     <div class="space"></div>
     <div class="deli-footer">
@@ -76,7 +76,7 @@ export default class BatchbyOneModal extends Vue {
   editResult(v:any){
     this.data[this.currentOrder] = v;
     this.getStoreCount(v);
-    this.getPriceInfo(v);
+    // this.getPriceInfo(v);
   }
   prichChange(index:number){
     this.currentPrice[this.data[this.currentOrder].omsOrderIds] = this.priceObj[this.data[this.currentOrder].omsOrderIds][index];
@@ -143,10 +143,10 @@ export default class BatchbyOneModal extends Vue {
       this.$message("请编辑订单信息");
       return
     }
-    if(!this.currentPrice[this.data[this.currentOrder].omsOrderIds]){
-      this.$message("请选择价格!");
-      return
-    }
+    // if(!this.currentPrice[this.data[this.currentOrder].omsOrderIds]){
+    //   this.$message("请选择价格!");
+    //   return
+    // }
     this.sendGoods(this.data[0]);
   }
   nextBtn(){
@@ -163,10 +163,10 @@ export default class BatchbyOneModal extends Vue {
       this.$message("请编辑订单信息");
       return
     }
-    if(!this.currentPrice[_value.omsOrderIds]){
-      this.$message('请选择价格!')
-      return
-    }
+    // if(!this.currentPrice[_value.omsOrderIds]){
+    //   this.$message('请选择价格!')
+    //   return
+    // }
     if(_value.isSuccess){
       this.$message('订单:'+_value.omsOrderIds+'已执行过发货操作!');
       return
@@ -174,8 +174,9 @@ export default class BatchbyOneModal extends Vue {
     this.sendGoods(_value,true);
   }
   qtyChange(v:any){
+    this.data[this.currentOrder] = v;
     this.getStoreCount(v);
-    this.getPriceInfo(v);
+    // this.getPriceInfo(v);
   }
   //查库存
   getStoreCount(item:any,callback?:Function){
@@ -232,14 +233,14 @@ export default class BatchbyOneModal extends Vue {
     }
     
     let params:any=(this as any).$lodash.cloneDeep(item);
-    if(this.priceObj[item.omsOrderIds]){
-      try{
-        params.pricePlan = JSON.stringify(this.priceObj[item.omsOrderIds])
-      }catch(e){}
-    }
-    if(this.currentPrice[item.omsOrderIds]){
-      params.priceId = this.currentPrice[item.omsOrderIds].id;
-    }
+    // if(this.priceObj[item.omsOrderIds]){
+    //   try{
+    //     params.pricePlan = JSON.stringify(this.priceObj[item.omsOrderIds])
+    //   }catch(e){}
+    // }
+    // if(this.currentPrice[item.omsOrderIds]){
+    //   params.priceId = this.currentPrice[item.omsOrderIds].id;
+    // }
     params.tmsMaterials=[];
     if(item.subItem){
       let skuIds:Array<any>=[];

+ 22 - 2
src/views/audit/store/components/deliveryGoodsInfo.vue

@@ -29,7 +29,7 @@
       <div class="info-row"> 
         <div class="info-col col-width">
           <span class="label">入库方式:</span>
-          <span :title="value.tmsTransportMethod">{{ value.sendType }}</span>
+          <span :title="value.sendType">{{ sendTypeName(value.sendType) }}</span>
         </div>
         <div class="info-col col-width">
           <span class="label">备注:</span>
@@ -99,7 +99,7 @@
           :data="value.subItem">
           <vxe-column field="tmsGoodsCode" title="物料编码" width="130"></vxe-column>
           <vxe-column field="name" title="物料名称" width="260"></vxe-column>
-          <vxe-column field="weight" title="重量"></vxe-column>
+          <vxe-column field="weight" title="重量(g)"></vxe-column>
           <vxe-column field="price" title="单价"></vxe-column>
           <vxe-column field="tmsQuantity" title="数量" width="120">
             <template #default="{ row }">
@@ -160,6 +160,8 @@ export default class DeliveryGoodsInfo extends Vue {
         }],
         tmsShipmentContacts:[{
           required: true, message: '发货人电话不能为空!', trigger: 'blur'
+        },{
+          validator: this.validatePhone, trigger: 'blur' 
         }],
         // tmsShipmentProvince:[{
         //   required: true, message: '请选择发货地址!', trigger: 'change'
@@ -172,6 +174,8 @@ export default class DeliveryGoodsInfo extends Vue {
         }],
         tmsUnloadingContacts:[{
           required: true, message: '收货人电话不能为空!', trigger: 'blur'
+        },{
+          validator: this.validatePhone, trigger: 'blur' 
         }],
         // tmsUnloadingProvince:[{
         //   required: true, message: '请选择收货地址!', trigger: 'change'
@@ -440,6 +444,19 @@ export default class DeliveryGoodsInfo extends Vue {
       }]
     ]
   }
+
+  sendTypeName(v:string) {
+    let n = ''
+    if(v == 'B2BRK'){
+      n = 'B2B入库'
+    }else if(v == 'YKCK'){
+      n = '越库出库'
+    }else if(v == 'B2CRK'){
+      n = 'B2C入库'
+    }
+    return n;
+  }
+
   validatePhone(rule:any, value:any, callback:any){
     if (value) {
       if(!/^1[3|4|5|6|7|8|9][0-9]\d{8}$/.test(value)) {
@@ -471,6 +488,9 @@ export default class DeliveryGoodsInfo extends Vue {
         }
       }
     }
+    if(Number(this.totalWeight)){
+      this.totalWeight = divide(this.totalWeight,1000)?.toFixed(3);
+    }
   }
   hide(){
     (this.$refs.form as any).clearValue();

+ 1 - 1
src/views/audit/supplier/index.vue

@@ -512,7 +512,7 @@
 		}
 		// 打开编辑
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.isShow = 'add'; // 展示类型
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });

+ 1 - 1
src/views/audit/virtually/index.vue

@@ -395,7 +395,7 @@
 		}
 		// 打开编辑
 		openEdit(e : any) {
-			console.log('打开编辑 ==> ', e);
+			// console.log('打开编辑 ==> ', e);
 			this.popTitle = '编辑'
 			let loading = this.$loading({ target: '.main-container' });
 			this.getTreeList();

+ 5 - 5
src/views/audit/warehousing/index.vue

@@ -811,7 +811,7 @@
 						query.suborderList.splice(i, 1)
 					}
 				});
-				console.log('保存参数query ==> ', query);
+				// console.log('保存参数query ==> ', query);
 				let loading = this.$loading({ target: '.main-container' });
 				if (this.isAdd) {
 					api.saveList(query, 'supplyEntryOrder').then((res : any) => {
@@ -841,7 +841,7 @@
 		}
 		// 打开新增
 		onAdd(e : any) {
-			console.log('新增 ==>', e);
+			// console.log('新增 ==>', e);
 			if (e === 'billTable_0') {
 				(this.$refs.product as any).setShow(true); // 打开sku弹窗
 			} else {
@@ -1041,8 +1041,8 @@
 				}).catch(() => this.$message.info('已取消提交'));
 			} else {
 				if (this.isAdd) return this.$message.warning('新增数据必须先保存才能提交');
-				console.log('isChange ==> ', this.isChange);
-				console.log('isSubmit ==> ', this.isSubmit);
+				// console.log('isChange ==> ', this.isChange);
+				// console.log('isSubmit ==> ', this.isSubmit);
 				if (this.isSubmit) {
 					this.$confirm('确定提交吗!', '注意', {
 						confirmButtonText: '确定',
@@ -1141,7 +1141,7 @@
 		}
 		// 切换tab栏
 		clickTab(e : any) {
-			console.log('切换tab ==> ', e);
+			// console.log('切换tab ==> ', e);
 			this.tabType = e;
 			(this.$refs.bill as any).showTab = e;
 			// submitState: 提交状态

+ 1 - 1
src/views/oms/B2BOrder/components/deliveryGoodsInfo.vue

@@ -502,7 +502,7 @@ export default class DeliveryGoodsInfo extends Vue {
     this.value.wmsSendType = 'B2BCK'
     this.totalWeight = 0;
     if(v.weight){
-      this.totalWeight = divide(v.weight,1000)
+      this.totalWeight = divide(v.weight,1000)?.toFixed(3)
     }
     
     // this.totalWeight = divide(v.weight,1000);

+ 6 - 2
src/views/oms/B2BOrder/components/questModel.vue

@@ -100,7 +100,6 @@ export default class QuestModel extends Vue {
     }]
   }
   questData:Array<any>=[]
-  
   mounted(){
     
   }
@@ -173,8 +172,13 @@ export default class QuestModel extends Vue {
   //获取异常数据
   getQuestionList(){
     this.load = true;
+    this.questData = [];
     queryAll().then((res:any) => {
-      this.questData = res.data;
+      for(const item of res.data) {
+        if(!(item.isSystem == 1 && item.isShow == 0)){
+          this.questData.push(item)
+        }
+      }
       if(this.$refs.table){
         (this.$refs.table as any).setValue(this.questData);
       }

+ 1 - 1
src/views/oms/B2COrder/components/deliveryGoodsInfo.vue

@@ -502,7 +502,7 @@ export default class DeliveryGoodsInfo extends Vue {
     this.value.wmsSendType = 'B2BCK'
     this.totalWeight = 0;
     if(v.weight){
-      this.totalWeight = divide(v.weight,1000)
+      this.totalWeight = divide(v.weight,1000)?.toFixed(3)
     }
     // if(this.value.subItem && this.value.subItem.length > 0){
     //   for(const item of this.value.subItem){

+ 6 - 2
src/views/oms/B2COrder/components/questModel.vue

@@ -100,7 +100,6 @@ export default class QuestModel extends Vue {
     }]
   }
   questData:Array<any>=[]
-  
   mounted(){
     
   }
@@ -173,8 +172,13 @@ export default class QuestModel extends Vue {
   //获取异常数据
   getQuestionList(){
     this.load = true;
+    this.questData = [];
     queryAll().then((res:any) => {
-      this.questData = res.data;
+      for(const item of res.data) {
+        if(!(item.isSystem == 1 && item.isShow == 0)){
+          this.questData.push(item)
+        }
+      }
       if(this.$refs.table){
         (this.$refs.table as any).setValue(this.questData);
       }

+ 23 - 2
src/views/oms/omsLabel/index.vue

@@ -1,9 +1,10 @@
 <template>
   <div class="oms-label" id="labelPage" v-loading="load">
-    <by-tool :propConfig="tool" class="tool" @clickHandle="clickHandle" id="labelTool" />
+    <by-tool :propConfig="tool" v-if="userInfo && userInfo.userName == 'admin'" class="tool" @clickHandle="clickHandle" id="labelTool" />
     <by-table :propConfig="tableConfig" ref="table">
       <template v-slot:ordered="{row}">
-        <vxe-input v-model="row.ordered" size="small" type="number"></vxe-input>
+        <vxe-input v-if="userInfo && userInfo.userName == 'admin'" v-model="row.ordered" size="small" type="number"></vxe-input>
+        <span v-else>{{ row.ordered }}</span>
       </template>
     </by-table>
     <add-label ref="addLabel" @handleSuccess="getList" />
@@ -17,6 +18,7 @@ import addLabel from './components/addLabel.vue'
 @Component({components:{addLabel}})
 export default class OmsLabel extends Vue {
   load=false;
+  userInfo:any= {};
   tool={
     tools:{
       add:true,
@@ -45,6 +47,14 @@ export default class OmsLabel extends Vue {
       plugins:[{
         name:'排序',
         event:{
+          show:() => {
+            let userInfo = this.$store.getters.userInfo;
+            if(userInfo && userInfo.userName == 'admin'){
+              return true
+            }else{
+              return false
+            }
+          },
           click:(row:any) => {
             this.sortHandle(row);
           }
@@ -52,6 +62,14 @@ export default class OmsLabel extends Vue {
       },{
         name:'删除',
         event:{
+          show:() => {
+            let userInfo = this.$store.getters.userInfo;
+            if(userInfo && userInfo.userName == 'admin'){
+              return true
+            }else{
+              return false
+            }
+          },
           click:(row:any) => {
             this.delHandle(row);
           }
@@ -59,6 +77,9 @@ export default class OmsLabel extends Vue {
       }]
     }]
   }
+  created() {
+    this.userInfo = this.$store.getters.userInfo;
+  }
   mounted(){
     this.$nextTick(()=>{
       let height = (document.getElementById('labelPage') as any).offsetHeight;

+ 39 - 4
src/views/oms/quesType/index.vue

@@ -1,20 +1,27 @@
 <template>
   <div class="ques" id="questTypePage" v-loading="load">
-    <by-tool :propConfig="tool" class="tool" @clickHandle="clickHandle" />
+    <by-tool :propConfig="tool" class="tool" @clickHandle="clickHandle" v-if="userInfo && userInfo.userName == 'admin'" />
     <by-table :propConfig="tableConfig" ref="table">
       <template v-slot:ordered="{row}">
-        <vxe-input v-model="row.ordered" size="small" type="number"></vxe-input>
+        <vxe-input v-if="userInfo && userInfo.userName == 'admin'" v-model="row.ordered" size="small" type="number"></vxe-input>
+        <span v-else>{{ row.ordered }}</span>
       </template>
       <template v-slot:priority="{row}">
-        <vxe-input v-model="row.priority" size="small" type="number"></vxe-input>
+        <vxe-input v-if="userInfo && userInfo.userName == 'admin'" v-model="row.priority" size="small" type="number"></vxe-input>
+        <span v-else>{{ row.priority }}</span>
       </template>
       <template v-slot:isShow="{row}">
         <el-switch
+          v-if="userInfo && userInfo.userName == 'admin'"
           v-model="row.isShow"
           :active-value="1"
           :inactive-value="0"
           @change="changeShow($event,row)">
         </el-switch>
+        <template v-else>
+          <el-tag v-if="row.isShow == 1">显示</el-tag>
+          <el-tag v-else type="danger">隐藏</el-tag>
+        </template>
       </template>
     </by-table>
     <add-quest-model ref="addQuestModel" @handleSuccess="getQuestionList" />
@@ -28,6 +35,7 @@ import AddQuestModel from "./components/addQuest.vue";
 @Component({components:{AddQuestModel}})
 export default class QuestType extends Vue {
   load=false;
+  userInfo:any= {};
   tool={
     tools:{
       add:true,
@@ -57,7 +65,7 @@ export default class QuestType extends Vue {
       width:150,
       slot:true
     },{
-      title:'显示',
+      title:'显示/隐藏',
       field:'isShow',
       width:150,
       slot:true
@@ -68,6 +76,14 @@ export default class QuestType extends Vue {
       plugins:[{
         name:'排序',
         event:{
+          show:() => {
+            let userInfo = this.$store.getters.userInfo;
+            if(userInfo && userInfo.userName == 'admin'){
+              return true
+            }else{
+              return false
+            }
+          },
           click:(row:any) => {
             this.sortHandle(row);
           }
@@ -75,6 +91,14 @@ export default class QuestType extends Vue {
       },{
         name:'优先级',
         event:{
+          show:() => {
+            let userInfo = this.$store.getters.userInfo;
+            if(userInfo && userInfo.userName == 'admin'){
+              return true
+            }else{
+              return false
+            }
+          },
           click:(row:any) => {
             this.priorityHandle(row)
           }
@@ -82,6 +106,14 @@ export default class QuestType extends Vue {
       },{
         name:'删除',
         event:{
+          show:() => {
+            let userInfo = this.$store.getters.userInfo;
+            if(userInfo && userInfo.userName == 'admin'){
+              return true
+            }else{
+              return false
+            }
+          },
           click:(row:any) => {
             this.delHandle(row);
           }
@@ -89,6 +121,9 @@ export default class QuestType extends Vue {
       }]
     }]
   }
+  created() {
+    this.userInfo = this.$store.getters.userInfo;
+  }
   mounted(){
     let height = (document.getElementById('questTypePage') as any).offsetHeight;
     this.tableConfig.attr.height=height - 32 - 48;