Browse Source

前端 pc 更新 sdy

zhongtianhaoyuan 3 years ago
parent
commit
66eba2d1ac

+ 2 - 2
.env.production

@@ -4,8 +4,8 @@
 
 NODE_ENV = 'production'
 # base api
-VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
-#VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
+#VUE_APP_BASE_API = 'https://api2.eliangeyun.com'
+VUE_APP_BASE_API = 'https://apitest.eliangeyun.com'
 
 # 微服务相关接口配置
 ## 任务消息

+ 1 - 1
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -10,7 +10,7 @@
             <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
             </el-option>
           </el-select>
-          <el-checkbox v-model="checked" @change="allowEdit" :disabled="warehouseList.length==0">允许手动编辑重量</el-checkbox>
+          <el-checkbox v-hasPermission=" `acquisitionManagement.acquisition.allow`" v-model="checked" @change="allowEdit" :disabled="warehouseList.length==0">允许手动编辑重量</el-checkbox>
         </div>
       </template>
     </BaseHeaderLayout>

+ 54 - 54
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -295,7 +295,7 @@
             deductWeight: '',
             waterMin: '',
             waterMax: '',
-            saleLimit: 500,
+            saleLimit: 2000,
             statusFlag: '',
             status: '',
             workflowId: '',
@@ -379,7 +379,7 @@
           //构造查看priceList数据
           this.priceList = []
           this.makeLookPriceList()
-          if(this.$route.query.type == '编辑'){
+          if(this.$route.query.type != '新增'){
                let _data = this.priceList
               for (let i = 0; i < _data.length; i++) {
                 if (i == 0) this.checkList1 = _data[i].checkList
@@ -713,13 +713,12 @@
           }
           return false
         }
-        
-        if (this.baseInfoForm.waterBase>this.baseInfoForm.waterMax) {
+        if (Number(this.baseInfoForm.waterBase)>Number(this.baseInfoForm.waterMax)) {
             this.$message.error('基准水分须小于水分上限!')
           return false
         }
         
-        if (this.baseInfoForm.waterMin>this.baseInfoForm.waterBase) {
+        if (Number(this.baseInfoForm.waterMin)>Number(this.baseInfoForm.waterBase)) {
             this.$message.error('干粮水分须小于基准水分!')
           return false
         }
@@ -800,56 +799,57 @@
       },
       // 提交
       submit() {
-        this.isCountShow = false
-        let isValidate = false
-         isValidate = this.validate()
-                if (isValidate) {
-        this.makeTableList()
-        this.baseInfoForm.details = []
-        this.makePriceDataList()
-        this.baseInfoForm.goodsName = this.selectVal
-        switch (this.$route.query.type) {
-          case '查看':
-            this.isCountShow = false;
-            break;
-          case '新增':
-            isValidate = this.validate()
-            if (isValidate) {
-              purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
-                // this.tableData = response.records
-                this.isCountShow = false
-              })
-            }
-            break;
-          case '编辑':
-            this.getEditCheckList()
-            isValidate = this.validate()
-            if (isValidate) {
-              purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
-                this.isCountShow = false
-              })
-            }
-            break;
-          case '审核中':
-            // this.makePriceDataList()
-            this.getEditCheckList()
-            isValidate = this.validate()
-            if (isValidate) {
-              purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
-                let that = this
-                this.$confirm(`是否确定通过?`, {
-                  cancelButtonText: '取消',
-                  confirmButtonText: '确定',
-                  type: 'warning',
-                }).then(() => {
-                  //审核
-                  that.audit(this.baseInfoForm, true, 2)
+          let isValidate = false
+          isValidate = this.validate()
+         
+        if (isValidate) {
+          this.isCountShow = false
+          this.makeTableList()
+          this.baseInfoForm.details = []
+          this.makePriceDataList()
+          this.baseInfoForm.goodsName = this.selectVal
+          switch (this.$route.query.type) {
+            case '查看':
+              this.isCountShow = false;
+              break;
+            case '新增':
+              isValidate = this.validate()
+              if (isValidate) {
+                purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
+                  // this.tableData = response.records
+                  this.isCountShow = false
                 })
-              })
-            }
-            break;
-        }
-            }
+              }
+              break;
+            case '编辑':
+              this.getEditCheckList()
+              isValidate = this.validate()
+              if (isValidate) {
+                purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
+                  this.isCountShow = false
+                })
+              }
+              break;
+            case '审核中':
+              // this.makePriceDataList()
+              this.getEditCheckList()
+              isValidate = this.validate()
+              if (isValidate) {
+                purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
+                  let that = this
+                  this.$confirm(`是否确定通过?`, {
+                    cancelButtonText: '取消',
+                    confirmButtonText: '确定',
+                    type: 'warning',
+                  }).then(() => {
+                    //审核
+                    that.audit(this.baseInfoForm, true, 2)
+                  })
+                })
+              }
+              break;
+          }
+       }
 
       },
       //审核

+ 2 - 1
src/views/houseSelfCollect/inspectInfo.vue

@@ -226,9 +226,10 @@
         if (datetime < 10) {
           datetime = '0' + datetime
         }
-        return year + mouth + datetime
+        return String(year) + String(mouth) + String(datetime)
       },
       calculation() {
+        console.log(this.getdate())
         let number = '000' + this.count
         number = number.substring(number.length - 4, number.length)
         this.inspect.qualityNo = 'ZCRK' + this.getdate() + this.cangNo + number //ZCRK+8位时间+3位仓库编号+4位序列号

+ 11 - 11
src/views/platformaudit/grainPulseDynamic.vue

@@ -82,21 +82,21 @@
           <!-- class="record"
            class="record" -->
           <template slot-scope="scope">
-            <el-button
-              size="medium"
-              type="danger"
+            <div
+              class="record"
               v-if="scope.row.statusFlag == 1"
               @click="rejectList(scope.row)"
-              >驳回</el-button
             >
-            <el-button
-              size="medium"
-              type="primary"
-              v-if="scope.row.statusFlag == 1"
+              驳回
+            </div>
+            <div
+              class="record"
+               v-if="scope.row.statusFlag == 1"
               @click="adoptList(scope.row)"
               v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
-              >通过</el-button
             >
+              通过
+            </div>
             <template
               v-else
               v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
@@ -145,8 +145,8 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <span v-if="SettledCompanyDynamicsList.statusFlag == '1'">
-          <el-button @click="reject(id)" type="danger">驳回</el-button>
-          <el-button @click="adopt(id)" type="primary">通过</el-button>
+          <el-button @click="reject(id)" >驳回</el-button>
+          <el-button @click="adopt(id)" >通过</el-button>
         </span>
         <span v-else-if="SettledCompanyDynamicsList.statusFlag != '1'"
           ><el-button @click="dialogFormVisible = fase">关闭</el-button>

+ 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 - 35
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) {

+ 1 - 1
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -422,7 +422,6 @@ export default {
   data() {
     let self = this
     return {
-      flag: 2,
       checkList: [],
       deptBudgetList: {
         taskNo: '',
@@ -694,6 +693,7 @@ export default {
         })
       xialaNo({
         compId: this.compId,
+        flag: 8,
       })
         .toPromise()
         .then((response) => {

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

@@ -884,6 +884,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)
@@ -1529,15 +1538,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

@@ -933,6 +933,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
@@ -1217,15 +1226,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
       }

+ 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