瀏覽代碼

修改bug

web100 2 年之前
父節點
當前提交
8a29f0af3c

+ 2 - 2
src/views/approveData/index.vue

@@ -48,10 +48,10 @@
         <span v-else-if="scope.row.checkType == 'XSTD'">销售退单请核</span>
         <span v-else-if="scope.row.checkType == 'YPJ-XSTH'">销售退款退货</span>
       </template>
-      <template slot="menuLeft">
+      <!-- <template slot="menuLeft">
         <el-button size="small" type="success" :disabled="selectionList.length == 0" @click.stop="batchCheck">批量审批
         </el-button>
-      </template>
+      </template> -->
       <template slot-scope="scope" slot="menu">
         <el-button type="text" size="small" :disabled="scope.row.operate" @click.stop="jumpPage(scope.row)">查看
         </el-button>

+ 1 - 0
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -3,6 +3,7 @@
   "lazy": true,
   "tip": false,
   "stripe": true,
+  "addBtn":false,
   "addBtnText": "创建单据",
   "searchShow": true,
   "searchMenuPosition": "right",

+ 1 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -8,7 +8,7 @@
         @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @saveColumn="saveColumn"
         @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" :cell-style="cellStyle">
         <template slot="menuLeft" slot-scope="{size}">
-          <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
+          <!-- <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button> -->
           <el-button type="info" :size="size" icon="el-icon-printer" :loading="exportLoading" @click.stop="statement">
             报表打印</el-button>
           <el-button type="warning" size="small" icon="el-icon-top" @click.stop="openExport()">导出</el-button>

+ 26 - 3
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -161,7 +161,7 @@
                 :disabled="detailData.seeDisabled">录入明细
               </el-button>
               <el-button type="warning" icon="el-icon-plus" size="small"
-                :disabled="selection.length < 1 || detailData.seeDisabled || form.createFreight == 1"
+                :disabled="selection.length !== contactsData.length || detailData.seeDisabled || form.createFreight == 1 || contactsData.length == 0"
                 @click="getShipmentC">生成工厂发货
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()">报 表</el-button>
@@ -676,6 +676,7 @@ export default {
     }
   },
   mounted() {
+
     this.$nextTick(() => {
       // 监听浏览器高度变化,改变表格高度
       window.onresize = () => {
@@ -706,6 +707,7 @@ export default {
     feeList().then(res => {
       this.feesOption = res.data.data.records
     })
+    this.getDefault()
     if (this.detailData.check) {
       this.checkDisabled = true
       this.batchNo = this.detailData.check.batchNo
@@ -834,6 +836,26 @@ export default {
         this.pageLoading = false
       });
     },
+    getDefault() {
+      let date = new Date();
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      let day = date.getDate();
+      if (month < 10) {
+        month = "0" + month;
+      }
+      if (day < 10) {
+        day = "0" + day;
+      }
+      let hours = String(date.getHours()).padStart(2, '0');
+      let minutes = String(date.getMinutes()).padStart(2, '0');
+      let seconds = String(date.getSeconds()).padStart(2, '0');
+      let nowDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+      this.$set(this.form, 'paymentType', '预付')
+      this.$set(this.form, 'requiredArrivalDate', nowDate)
+      this.$set(this.form, 'packageRemarks', '无包装')
+
+    },
     copyOrder() {
       this.queryData(this.form.id, true)
     },
@@ -935,6 +957,7 @@ export default {
     },
     //商品选中触发
     productSelection(selection) {
+      console.log(selection);
       this.selection = selection
     },
     //费用新增触发
@@ -1526,8 +1549,8 @@ export default {
       if (row.belongtocompany) {
         // this.form.belongToCorpId = row.belongtocompany
       }
-      this.$set(this.form, 'paymentType', row.paymentType)
-      this.$set(this.form, 'packageRemarks', row.packageRemarks)
+      // this.$set(this.form, 'paymentType', row.paymentType)
+      // this.$set(this.form, 'packageRemarks', row.packageRemarks)
       getlistBankBy(row.id).then(res => {
         this.$set(this.form, 'banks', null)
         this.$set(this.form, 'banksAccountName', null)

+ 11 - 23
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -47,7 +47,8 @@
     },
     {
       "name": "containerVolume",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 5
     }
   ],
   "column":[
@@ -108,24 +109,11 @@
           "trigger": "blur"
         }
       ]
-    },{
-      "label": "包装要求",
-      "prop": "packageRemarks",
-      "index": 5,
-      "width":100,
-      "cell": true,
-      "overHidden": true,
-      "rules": [
-        {
-          "required": false,
-          "message": "请输入包装要求",
-          "trigger": "blur"
-        }
-      ]
-    },{
+    },
+    {
       "label": "采购数量",
       "prop": "purchaseQuantity",
-      "index": 6,
+      "index": 5,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -139,7 +127,7 @@
     },{
       "label": "采购金额",
       "prop": "purchaseAmount",
-      "index": 7,
+      "index": 6,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -153,7 +141,7 @@
     },{
       "label": "库区",
       "prop": "storageId",
-      "index": 8,
+      "index": 7,
       "width": 150,
       "cell": false,
       "overHidden": true,
@@ -165,7 +153,7 @@
     },{
       "label": "入库数量",
       "prop": "actualQuantity",
-      "index": 9,
+      "index": 8,
       "width":100,
       "cell": false,
       "slot": true,
@@ -180,7 +168,7 @@
     },{
       "label": "入库金额",
       "prop": "deliveryAmount",
-      "index": 10,
+      "index": 9,
       "width":100,
       "cell": true,
       "overHidden": true,
@@ -195,7 +183,7 @@
     {
       "label": "重量",
       "prop": "actualWeight",
-      "index":11,
+      "index":10,
       "width":100,
       "cell": false,
       "overHidden": true,
@@ -210,7 +198,7 @@
     {
       "label": "体积",
       "prop": "containerVolume",
-      "index": 12,
+      "index": 11,
       "width":100,
       "cell": false,
       "overHidden": true,

+ 9 - 8
src/views/businessManagement/receipt/configuration/mainList.json

@@ -3,6 +3,7 @@
   "lazy": true,
   "tip": false,
   "stripe": true,
+  "addBtn":false,
   "addBtnText": "创建单据",
   "searchShow": true,
   "height": "auto",
@@ -35,14 +36,6 @@
   ],
   "column": [
     {
-      "label": "销售订单号",
-      "prop": "orgOrderNo",
-      "search": true,
-      "index": 1,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "采购订单号",
       "prop": "orderNo",
       "search": true,
@@ -249,6 +242,14 @@
         }
       ],
       "overHidden": true
+    },
+    {
+      "label": "销售订单号",
+      "prop": "orgOrderNo",
+      "search": true,
+      "index": 21,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 46 - 21
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -663,7 +663,21 @@ export default {
   },
   //初始化查询
   async created() {
-
+    //获取时间
+      let date = new Date();
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      let day = date.getDate();
+      if (month < 10) {
+        month = "0" + month;
+      }
+      if (day < 10) {
+        day = "0" + day;
+      }
+      let hours = String(date.getHours()).padStart(2, '0');
+      let minutes = String(date.getMinutes()).padStart(2, '0');
+      let seconds = String(date.getSeconds()).padStart(2, '0');
+      let nowDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
     this.rowHeight = (window.innerHeight - 130) + 'px'
     this.customerContact = await this.getColumnData(this.getColumnName(24), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(25), advantageProject);
@@ -712,18 +726,22 @@ export default {
     this.form.totalQuantity = 0
     this.form.purchaseAmount = 0
     this.form.deliveryStatus = '录入'
-    console.log('456', this.detailData.form);
+    // console.log('456', this.detailData.form);
     this.form.orderItemsList = []
 
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
     } else if (this.detailData.form) {
-      console.log('1132452345', this.detailData.form);
-
+      // console.log('1132452345', this.detailData.form);
       this.form = JSON.parse(this.detailData.form);
-      console.log(this.form);
+      // console.log(this.form);
       this.$set(this.form, 'orgId', this.form.id);
       this.$set(this.form, 'srcId', this.form.id);
+      this.$set(this.form,"purchaseMode",'现金采购');
+      this.$set(this.form,"warehouseType",'自有库');
+      // this.$set(this.form,"storageId",'仓库');
+      this.$set(this.form,"businessDate",nowDate);
+      
       delete this.form.createTime
       delete this.form.id
       delete this.form.sysNo
@@ -782,7 +800,7 @@ export default {
         "storageTypeId": e
       }
       storageDesc(queryParams).then(res => {
-        console.log(res.data.data);
+        // console.log(res.data.data);
         this.storageQuantityList = res.data.data.records
 
       })
@@ -877,17 +895,14 @@ export default {
       });
     },
     handleStorageNameChange(row) {
-      console.log(row)
       this.choiceIndexT = row.$index
-      console.log(row.storageId);
       let index
-      console.log(row.storageQuantityList);
+      // console.log(row.storageQuantityList);
       if (row.storageQuantityList.length > 0) {
 
         index = row.storageQuantityList.findIndex(function (item) {
           return item.storageId === row.storageId;
         });
-        console.log(index);
         this.contactsData[this.choiceIndexT].storageName = row.storageQuantityList[index].storageName;
         this.contactsData[this.choiceIndexT].storageId = row.storageQuantityList[index].storageId;
       } else {
@@ -895,11 +910,10 @@ export default {
           "storageTypeId": this.form.storageId
         }
         storageDesc(queryParams).then(res => {
-          console.log(res.data.data);
+
           index = res.data.data.records.findIndex(function (item) {
             return item.id === row.storageId;
           });
-          console.log(index);
           this.contactsData[this.choiceIndexT].storageName = res.data.data.records[index].cname;
           this.contactsData[this.choiceIndexT].storageId = res.data.data.records[index].id;
         })
@@ -976,14 +990,13 @@ export default {
     choice(row) {
       this.dialogCost = !this.dialogCost
       this.choiceData = true
-      console.log(row)
+      // console.log(row)
       this.choiceIndex = row.$index
     },
     //点击商品明细选择触发
     commodityChoice(row) {
       this.dialogVisible = !this.dialogVisible
       this.commodityData = true
-      console.log(row)
       this.choiceIndexT = row.$index
     },
     //点击仓库
@@ -1029,7 +1042,7 @@ export default {
       // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
       if (this.tableDataCost.length > 0) {
         for (let item in this.tableDataCost) {
-          console.log(this.tableDataCost[item])
+          // console.log(this.tableDataCost[item])
           this.tableDataCost[item].itemId = this.tableDataCost[item].id
           this.tableDataCost[item].feeName = this.tableDataCost[item].cname
           this.tableDataCost[item].sort = this.maxFeeNum + 1
@@ -1111,12 +1124,10 @@ export default {
     },
     //选中触发
     selectionChange(list) {
-      console.log(list);
       this.tableData = list
     },
     //费用选中触发
     selectionChangeCost(list) {
-      console.log(list);
       this.tableDataCost = list
     },
     //导入页左商品类型查询
@@ -1195,7 +1206,7 @@ export default {
     onLoad(page, params = {}) {
       this.loading = true;
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
-        console.log(res)
+
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
@@ -1218,7 +1229,7 @@ export default {
         feesTypeId: this.treeDeptIdCost
       })
       customerList(queryParams).then(res => {
-        console.log(res)
+        // console.log(res)
         const data = res.data.data;
         this.pageCost.total = data.total;
         this.dataCost = data.records;
@@ -1269,6 +1280,12 @@ export default {
           if (this.contactsData.length == 0) {
             return this.$message.error('商品信息为空')
           }
+          for(let k=0;k<this.contactsData.length;k++){
+            if (!this.contactsData[k].storageId) {
+            return this.$message.error('请选择库区')
+          }
+          }
+          
           if (contrastObj(this.form, this.oldForm) ||
             contrastList(this.contactsData, this.oldGoodsList) ||
             // contrastList(this.advantageProjectData, this.oldFeesList) ||
@@ -1335,13 +1352,21 @@ export default {
     editCustomer(isBack = false, type) {
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          this.contactsData.forEach(item=>{
+            if(!item.storageId){
+              this.$message.error('请选择库区')
+              return
+            }
+          })
+          console.log('4353',this.contactsData.storageId);
           this.form.deliveryAmount = 0
           this.form.totalQuantity = 0
-          this.form.purchaseAmount = 0
+          // this.form.purchaseAmount = 0
           this.contactsData.forEach(item => {
             this.form.deliveryAmount = Number(this.form.deliveryAmount) + Number(item.deliveryAmount)
             this.form.totalQuantity = Number(this.form.totalQuantity) + Number(item.actualQuantity)
-            this.form.purchaseAmount = Number(this.form.purchaseAmount) + Number(item.deliveryAmount)
+            // this.form.purchaseAmount = Number(this.form.purchaseAmount) + Number(item.deliveryAmount)
+            this.form.purchaseAmount = Number(this.form.purchaseAmount)
             this.form.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
             this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
           })

+ 1 - 1
src/views/businessManagement/receipt/index.vue

@@ -9,7 +9,7 @@
                  @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad" @saveColumn="saveColumn"
                  @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch" :cell-style="cellStyle">
         <template slot="menuLeft" slot-scope="{size}">
-          <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
+          <!-- <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button> -->
           <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
           <el-button type="warning" size="small" icon="el-icon-top" @click.stop="openExport()">导出</el-button>
         </template>

+ 16 - 2
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -256,7 +256,7 @@
             </template>-->
 
             <template slot="purchaseAmount" slot-scope="{ row }">
-              <el-input v-if="row.$cellEdit" v-model="row.purchaseAmount" @focus="getPurchasePrice(row)" allow-create
+              <el-input v-if="true" v-model="row.purchaseAmount" @focus="getPurchasePrice(row)" allow-create
                 filterable v-input-limit="2" default-first-option>
                 <el-option v-for="(item, index) in purchasePriceOption" :key="index" :label="item.purchasePrice"
                   :value="item.purchasePrice"></el-option>
@@ -311,7 +311,7 @@
               </el-button>
               <!--              禁用规则:未选择明细,未点击编辑按钮,未进行审批,已经生成过-->
               <el-button type="warning" icon="el-icon-plus" size="small"
-                :disabled="selection.length < 1 || detailData.seeDisabled || !form.status || form.status < 3 || form.createFreight == 1"
+                :disabled="selection.length !== goodsShowData.length || detailData.seeDisabled || !form.status || form.status < 3 || form.createFreight == 1 || goodsShowData.length == 0"
                 @click="getShipmentD" v-show="goodsActives == 'goods'">生成客户收货
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer" @click.stop="openReport()"
@@ -1517,6 +1517,7 @@ export default {
       this.goodsShowData[this.choiceIndexT].storageId = row.storageQuantityList[index].storageId;
       this.goodsShowData[this.choiceIndexT].storageQuantity = row.storageQuantityList[index].surplusRouteQuantity;
       this.goodsShowData[this.choiceIndexT].storageName = row.storageQuantityList[index].storageName;
+      this.goodsShowData[this.choiceIndexT].purchaseAmount = row.storageQuantityList[index].stockPrice;
     },
     getGoodsRow(event, row) {
 
@@ -1539,6 +1540,7 @@ export default {
           row.storageId = res.data.data[0].storageId
           row.storageName = res.data.data[0].storageName
           row.storageQuantity = res.data.data[0].surplusRouteQuantity
+          row.purchaseAmount = res.data.data[0].stockPrice
         }
 
       })
@@ -1800,6 +1802,8 @@ export default {
             this.goodsShowData[row.$index].storageId = res.data.data[0].storageId;
             this.goodsShowData[row.$index].storageName = res.data.data[0].storageName;
             this.goodsShowData[row.$index].storageQuantity = res.data.data[0].surplusRouteQuantity;
+            this.goodsShowData[row.$index].purchaseAmount = res.data.data[0].stockPrice
+
           }
 
         })
@@ -2242,6 +2246,8 @@ export default {
           row.storageId = res.data.data[0].storageId
           row.storageName = res.data.data[0].storageName
           row.storageQuantity = res.data.data[0].surplusRouteQuantity
+          row.purchaseAmount = res.data.data[0].stockPrice
+
         }
       })
       row.integralMultiples = event[0].integralMultiples
@@ -2278,6 +2284,8 @@ export default {
             this.goodsShowData[this.choiceIndexT].storageId = res.data.data[0].storageId
             this.goodsShowData[this.choiceIndexT].storageName = res.data.data[0].storageName
             this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data[0].surplusRouteQuantity
+            this.goodsShowData[this.choiceIndexT].purchaseAmount = res.data.data[0].stockPrice
+
           }
         })
       }
@@ -2351,6 +2359,8 @@ export default {
             this.$set(this.goodsListSave[item], 'storageId', res.data.data[0].storageId)
             this.$set(this.goodsListSave[item], 'storageName', res.data.data[0].storageName)
             this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
+            this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].stockPrice)
+
           }
 
           // this.goodsListSave[item].storageQuantity =  res.data.data
@@ -2434,6 +2444,7 @@ export default {
             this.tableData[item].storageId = res.data.data[0].storageId;
             this.tableData[item].storageName = res.data.data[0].storageName;
             this.tableData[item].storageQuantity = res.data.data[0].surplusRouteQuantity;
+            this.tableData[item].purchaseAmount = res.data.data[0].stockPrice;
           }
           console.log('1', res.data.data);
           this.tableData[item].priceCategory = this.tableData[item].goodsTypeName;
@@ -2654,6 +2665,8 @@ export default {
             this.$set(list[item], 'storageId', res.data.data[0].storageId)
             this.$set(list[item], 'storageName', res.data.data[0].storageName)
             this.$set(list[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
+            this.$set(list[item], 'purchaseAmount', res.data.data[0].stockPrice)
+
           }
           if (listLength != 0) {
             this.$set(buyFree[item], 'storageQuantityList', res.data.data)
@@ -3740,6 +3753,7 @@ export default {
             item.storageId = res.data.data[0].storageId
             item.storageName = res.data.data[0].storageName
             item.storageQuantity = res.data.data[0].surplusRouteQuantity
+            item.purchaseAmount = res.data.data[0].stockPrice
           }
 
         })