gjy 3 vuotta sitten
vanhempi
commit
c0ae29561e

+ 10 - 16
src/views/purchasingManagement/procurementPlanAdd.vue

@@ -620,21 +620,15 @@ export default {
       }
       return year + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90 && i < 97) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function () {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
-    },
+    MathRand()
+{
+var Num="";
+for(var i=0;i<4;i++)
+{
+Num+=Math.floor(Math.random()*10);
+}
+return Num
+},
     submit() {
       if (!this.dataList.title) {
         this.$message({
@@ -868,7 +862,7 @@ export default {
           this.$refs.dataList.validate(valid => {
             if (valid) {
               console.log(this.dataList)
-              this.dataList.procurementPlanNo='CGJH'+this.getdate()+this.verifyinit()
+              this.dataList.procurementPlanNo='CGJH'+this.getdate()+this.MathRand()
               this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
               this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
               this.dataList.receivePrivate =  CodeToText[this.selectedOptions[0]]

+ 0 - 15
src/views/purchasingManagement/procurementPlanEdit.vue

@@ -513,21 +513,6 @@ export default {
       }
       return year + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90 && i < 97) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function () {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
-    },
     dataFilter(val) {
       // console.log(val,"名")
       this.deptBudgetList.staffList = val

+ 10 - 16
src/views/salesManagement/salesPlanAdd.vue

@@ -510,21 +510,15 @@ export default {
       }
       return year + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90 && i < 97) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function () {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
-    },
+MathRand()
+{
+var Num="";
+for(var i=0;i<4;i++)
+{
+Num+=Math.floor(Math.random()*10);
+}
+return Num
+},
     dataFilter(val) {
       // console.log(val,"名")
       this.deptBudgetList.staffList = val
@@ -977,7 +971,7 @@ export default {
         .then(() => {
           this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.dataList.salePlanNo = 'XSJH' + this.getdate() + this.verifyinit()
+              this.dataList.salePlanNo = 'XSJH' + this.getdate() + this.MathRand()
               this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
               this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
               this.dataList.sendPrivate = CodeToText[this.selectedOptions[0]]

+ 0 - 15
src/views/salesManagement/salesPlanEdit.vue

@@ -451,21 +451,6 @@ export default {
       }
       return year + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90 && i < 97) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function() {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
-
-      return arr.join('')
-    },
     dataFilter(val) {
       // console.log(val,"名")
       this.deptBudgetList.staffList = val

+ 27 - 36
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -70,13 +70,16 @@
             <!-- </el-select> -->
           </el-form-item>
           <!-- 合同编号 -->
-            <!-- 合同编号 -->
-          <el-form-item label="合同编号" v-if="dataList.taskTypeKey != 3">
-            {{dataList.contractNo}}
-           
-          </el-form-item>
-           <el-form-item label="移库任务编号" v-if="dataList.taskTypeKey == 3">
-            {{dataList.moveTaskNo}}
+          <el-form-item label="合同编号">
+            <!-- <el-option
+              v-for="item in contractNoList"
+              :key="item.constKey"
+              :label="item.contractNo"
+              :value="item.contractNo"
+            ></el-option> -->
+            <div v-if="dataList.inOutType == '移库入库' || dataList.inOutType == '移库出库'">  {{dataList.moveTaskNo}}</div>
+            <div v-if="dataList.inOutType != '移库入库' || dataList.inOutType != '移库出库'">  {{dataList.contractNo}}</div>
+            <!-- </el-select> -->
           </el-form-item>
           <!-- 货名 -->
           <el-form-item label="货名" class="huom">
@@ -104,8 +107,8 @@
             {{dataList.grade}}
             <!-- </el-select> -->
           </el-form-item>
-          <!--容重(克/升)>=-->
-          <el-form-item label="容重(克/升)>=">
+          <!--容重(克/升)>=-->
+          <el-form-item label="容重(克/升)>=">
             {{dataList.bulkDensity}}
           </el-form-item>
           <!--水分(%)<=-->
@@ -177,12 +180,15 @@
             <!-- </el-select> -->
           </el-form-item>
           <!-- 合同编号 -->
-          <el-form-item label="合同编号" v-if="dataList1.taskTypeKey != 3">
-            {{dataList.contractNo}}
-           
-          </el-form-item>
-           <el-form-item label="移库任务编号" v-if="dataList1.taskTypeKey == 3">
-            {{dataList.moveTaskNo}}
+          <el-form-item label="合同编号">
+            <!-- <el-option
+              v-for="item in contractNoList"
+              :key="item.constKey"
+              :label="item.contractNo"
+              :value="item.contractNo"
+            ></el-option> -->
+               <div v-if="dataList.inOutType == '移库入库' || dataList.inOutType == '移库出库'">  {{dataList.moveTaskNo}}</div>
+            <div v-if="dataList.inOutType != '移库入库' || dataList.inOutType != '移库出库'">  {{dataList.contractNo}}</div>
           </el-form-item>
           <!-- 货名 -->
           <el-form-item label="货名" class="huom">
@@ -208,8 +214,8 @@
             />
             {{dataList1.grade}}
           </el-form-item>
-          <!--容重(克/升)>=-->
-          <el-form-item label="容重(克/升)>=">
+          <!--容重(克/升)>=-->
+          <el-form-item label="容重(克/升)>=">
             {{dataList1.bulkDensity}}
           </el-form-item>
           <!--水分(%)<=-->
@@ -318,8 +324,8 @@
             {{dataList.grade}}
             <!-- </el-select> -->
           </el-form-item>
-          <!--容重(克/升)>=-->
-          <el-form-item label="容重(克/升)>=">
+          <!--容重(克/升)>=-->
+          <el-form-item label="容重(克/升)>=">
             {{dataList.bulkDensity}}
           </el-form-item>
           <!--水分(%)<=-->
@@ -489,7 +495,7 @@ export default {
       this.$router.go(-1)
     },
     returnsales() {
-      this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+      this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
     },
     // 获取当前年月日
     getdate() {
@@ -505,21 +511,7 @@ export default {
       }
       return year + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90 && i < 97) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function() {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
 
-      return arr.join('')
-    },
     dataFilter(val) {
       // console.log(val,"名")
       this.deptBudgetList.staffList = val
@@ -573,7 +565,7 @@ export default {
     },
     //关闭
     close() {
-      this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+      this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
     },
     tarechange(e) {
       if (this.dataList.grossWeight && this.dataList.tare) {
@@ -656,7 +648,6 @@ export default {
           } else {
             if(response[0].taskTypeKey==2){
               this.dataList1 = response[0]
-
             }else{
               this.dataList = response[0]
             }

+ 13 - 4
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -878,6 +878,15 @@ export default {
 
       return arr.join('')
     },
+    MathRand()
+{
+var Num="";
+for(var i=0;i<4;i++)
+{
+Num+=Math.floor(Math.random()*10);
+}
+return Num
+},
     selectTaskNo(e) {
       if (this.dataList.taskTypeKey == 3) {
         this.$set(this.dataList1, 'moveTaskNo', e)
@@ -1514,15 +1523,15 @@ export default {
     },
     tasknumber() {
       if (this.dataList.taskTypeKey == 1) {
-        this.inOutTaskNo = 'CK' + this.getdate() + this.verifyinit()
+        this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
       } else if (this.dataList.taskTypeKey == 2) {
-        this.inOutTaskNo1 = 'RK' + this.getdate() + this.verifyinit()
+        this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
       } else if (this.dataList.taskTypeKey == 3) {
-        var random = this.getdate() + this.verifyinit()
+        var random = this.getdate() + this.MathRand()
         this.inOutTaskNo = 'YKC' + random
         this.inOutTaskNo1 = 'YKR' + random
       } else if (this.dataList.taskTypeKey == 4) {
-        var random = this.getdate() + this.verifyinit()
+        var random = this.getdate() + this.MathRand()
         this.inOutTaskNo = 'TCC' + random
         this.inOutTaskNo1 = 'TCR' + random
       }

+ 13 - 4
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -937,6 +937,15 @@ export default {
 
       return arr.join('')
     },
+    MathRand()
+{
+var Num="";
+for(var i=0;i<4;i++)
+{
+Num+=Math.floor(Math.random()*10);
+}
+return Num
+},
     selectTaskNo(e) {
       if (this.dataList.taskTypeKey == 3) {
         this.dataList1.moveTaskNo = e
@@ -1221,15 +1230,15 @@ export default {
     },
     tasknumber() {
       if (this.dataList.taskTypeKey == 1) {
-        this.inOutTaskNo = 'CK' + this.getdate() + this.verifyinit()
+        this.inOutTaskNo = 'CK' + this.getdate() + this.MathRand()
       } else if (this.dataList.taskTypeKey == 2) {
-        this.inOutTaskNo1 = 'RK' + this.getdate() + this.verifyinit()
+        this.inOutTaskNo1 = 'RK' + this.getdate() + this.MathRand()
       } else if (this.dataList.taskTypeKey == 3) {
-        var random = this.getdate() + this.verifyinit()
+        var random = this.getdate() + this.MathRand()
         this.inOutTaskNo = 'YKC' + random
         this.inOutTaskNo1 = 'YKR' + random
       } else if (this.dataList.taskTypeKey == 4) {
-        var random = this.getdate() + this.verifyinit()
+        var random = this.getdate() + this.MathRand()
         this.inOutTaskNo = 'TCC' + random
         this.inOutTaskNo1 = 'TCR' + random
       }

+ 15 - 15
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -60,7 +60,7 @@
                 v-for="item in warehouseNameList"
                 :key="item.constKey"
                 :label="item.warehouseName"
-                :value="item.warehouseName"
+                :value="item.id"
               />
             </el-select>
           </el-form-item>
@@ -471,7 +471,7 @@
                 v-for="item in warehouseNameList"
                 :key="item.constKey"
                 :label="item.warehouseName"
-                :value="item.warehouseName"
+                :value="item.id"
               />
             </el-select>
           </el-form-item>
@@ -668,11 +668,10 @@ import {
   outexamine,
   getGoodsName
 } from '@/model/tasksport/index'
-import { packList } from '@/model/contarct/index'
 import { pullDown, getstaff } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
-import { mapActions, mapGetters, mapState } from 'vuex'
+import {  mapGetters } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
@@ -950,7 +949,16 @@ export default {
         }
       }
     },
-    selectwarehouseName() {},
+    selectwarehouseName(e) {
+      //经办人
+      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') ,warehouseId:e})
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+          //  this.agent = response
+        })
+    },
     tarechange(e) {
       if (this.dataList.grossWeight && this.dataList.tare) {
         this.dataList.netWeight = Number(
@@ -1086,11 +1094,11 @@ export default {
             if (response.length > 1) {
               this.dataList = response[0]
               this.dataList1 = response[1]
-                console.log(this.dataList1.inOutTaskNo,"入库任务")
+                console.log(this.dataList1.inOutTaskNo,'入库任务')
             } else {
                if(response[0].taskTypeKey==3){
                 this.deletetask=true
-                this.dataList1.inOutTaskNo='YKR'+response[0].inOutTaskNo.substr(response[0].inOutTaskNo.indexOf("C") + 1,response[0].inOutTaskNo.length)
+                this.dataList1.inOutTaskNo='YKR'+response[0].inOutTaskNo.substr(response[0].inOutTaskNo.indexOf('C') + 1,response[0].inOutTaskNo.length)
               }
               if(response[0].taskTypeKey==2){
               this.dataList1 = response[0]
@@ -1171,14 +1179,6 @@ export default {
         .then((response) => {
           this.warehouseNameList1 = response
         })
-      //经办人
-      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
-        .toPromise()
-        .then((response) => {
-          this.options = response
-          this.staffList = response
-          //  this.agent = response
-        })
     },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {

+ 0 - 14
src/views/warehouse/warehouseManagementPutOutLook.vue

@@ -367,21 +367,7 @@ export default {
       }
       return year + mouth + datetime
     },
-    // 随机验证码
-    verifyinit() {
-      var arr = []
-      for (var i = 48; i < 123; i++) {
-        if (i > 57 && i < 65) continue
-        if (i > 90 && i < 97) continue
-        arr.push(String.fromCharCode(i))
-      }
-      arr.sort(function () {
-        return Math.random() - 0.5
-      })
-      arr.length = 4
 
-      return arr.join('')
-    },
     dataFilter(val) {
       // console.log(val,"名")
       this.deptBudgetList.staffList = val