web100 %!s(int64=2) %!d(string=hai) anos
pai
achega
fd5670a4dc

+ 15 - 0
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -763,6 +763,20 @@ export default {
       let id = this.detailData.id
       this.queryData(id)
     } else if (this.detailData.form) {
+      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.form = JSON.parse(this.detailData.form);
       this.$set(this.form, 'orgId', this.form.id);
       delete this.form.createTime
@@ -770,6 +784,7 @@ export default {
       delete this.form.sysNo
       this.$set(this.form, 'deliveryStatus', '录入')
       this.$set(this.form, 'srcOrderNo', this.form.orgOrderNo)
+      this.$set(this.form, 'businessDate', nowDate)
       this.$set(this.form, 'arrivalContact', this.form.corpAttn)
       this.$set(this.form, 'arrivalTel', this.form.corpTel)
       this.$set(this.form, 'totalWeight', this.form.cartonWeight)

+ 3 - 2
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -30,11 +30,12 @@
     {
       "name": "orderQuantity",
       "type": "sum",
-      "decimals": 0
+      "decimals": 5
     },
     {
       "name": "cartonWeight",
-      "type": "sum"
+      "type": "sum",
+      "decimals": 5
     },
     {
       "name": "cntrVolumn",

+ 2 - 2
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -15,9 +15,9 @@
             账单处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="detailData.seeDisabled || !form.id" @click.native="applyPayment('申请')">
+            <!-- <el-dropdown-item :disabled="detailData.seeDisabled || !form.id" @click.native="applyPayment('申请')">
               申请货款
-            </el-dropdown-item>
+            </el-dropdown-item> -->
             <!--            <el-dropdown-item-->
             <!--              @click.stop.native="applyPayment('收费')"-->
             <!--              :disabled="!this.form.id"-->

+ 2 - 1
src/views/businessManagement/purchaseOrder/index.vue

@@ -588,7 +588,6 @@ export default {
     // 生成工厂发货
     createPlant(row, index) {
       let ids = [];
-      console.log(row)
       row.itemsList.forEach(item => {
         ids.push(item.id)
       })
@@ -597,6 +596,7 @@ export default {
         orderItemIds: ids
       }
       generateShipment(data).then(res => {
+        let generateShipmentId = res.data.data.id
         this.$confirm("此操作将生成工厂发货,是否继续?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -641,6 +641,7 @@ export default {
           res.data.data.srcOrderNo = res.data.data.orgOrderNo
           delete res.data.data.debitAmount
           res.data.data.deliveryItemsList.forEach(item => item.deliveryAmount = item.amount)
+          res.data.data.srcId = generateShipmentId
           genfactory(res.data.data).then(() => {
             this.$message.success('生成工厂发货成功')
             this.onLoad(this.page, this.search);

+ 41 - 25
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -250,6 +250,7 @@ import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees";
 import { dateFormat } from "@/util/date";
 import reportDialog from "@/components/report-dialog/main";
 import { customerList as storageType } from "@/api/basicData/basicStorageType"
+import { number } from "echarts";
 export default {
   name: "detailsPage",
   props: {
@@ -664,20 +665,20 @@ 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}`;
+    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);
@@ -737,11 +738,11 @@ export default {
       // console.log('324',this.form.cntrVolumn);
       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, "purchaseMode", '现金采购');
+      this.$set(this.form, "warehouseType", '自有库');
       // this.$set(this.form,"storageId",'仓库');
-      this.$set(this.form,"businessDate",nowDate);
-      
+      this.$set(this.form, "businessDate", nowDate);
+
       delete this.form.createTime
       delete this.form.id
       delete this.form.sysNo
@@ -988,6 +989,7 @@ export default {
     },
     //点击费用明细选择触发
     choice(row) {
+      console.log(21321412);
       this.dialogCost = !this.dialogCost
       this.choiceData = true
       // console.log(row)
@@ -1029,6 +1031,7 @@ export default {
     },
     //费用编辑导入触发
     choiceCost() {
+      console.log(2132);
       if (this.tableDataCost.length === 1) {
         this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
         this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
@@ -1040,6 +1043,7 @@ export default {
     //费用导入触发
     importCost() {
       // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
+      console.log(232);
       if (this.tableDataCost.length > 0) {
         for (let item in this.tableDataCost) {
           // console.log(this.tableDataCost[item])
@@ -1190,6 +1194,7 @@ export default {
     },
     //新增费用明细保存触发
     rowSaveProject(row, done, loading) {
+      console.log(row);
       // this.advantageProjectData.push(row)
       done()
     },
@@ -1280,12 +1285,12 @@ export default {
           if (this.contactsData.length == 0) {
             return this.$message.error('商品信息为空')
           }
-          for(let k=0;k<this.contactsData.length;k++){
+          for (let k = 0; k < this.contactsData.length; k++) {
             if (!this.contactsData[k].storageId) {
-            return this.$message.error('请选择库区')
-          }
+              return this.$message.error('请选择库区')
+            }
           }
-          
+
           if (contrastObj(this.form, this.oldForm) ||
             contrastList(this.contactsData, this.oldGoodsList) ||
             // contrastList(this.advantageProjectData, this.oldFeesList) ||
@@ -1352,13 +1357,12 @@ export default {
     editCustomer(isBack = false, type) {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          this.contactsData.forEach(item=>{
-            if(!item.storageId){
+          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
@@ -1375,6 +1379,17 @@ export default {
           // this.form.deliveryFeesList = this.advantageProjectData
           this.form.deliveryFeesList = this.$refs.feeInfo.submitData()
           this.form.deliveryFilesList = this.bankOfDepositData
+
+          // this.form.deliveryFeesList
+          // 计算 deliveryFeesList 中 amount 的总和
+          let totalAmount = 0;
+          for(i=0;i<this.form.deliveryFeesList.length;i++){ 
+            totalAmount +=  this.form.deliveryFeesList[i].amount
+          }
+          console.log(totalAmount);
+          //计算费用明细
+          this.form.number = Number(this.form.purchaseAmount) + totalAmount
+          console.log(this.form.number);
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
@@ -1484,6 +1499,7 @@ export default {
     },
     //费用明细回调
     beforeFinance(feesData, callback) {
+      console.log(123214);
       this.advantageProjectData = feesData;
       let params = {}
       //暂时默认通过  之后优化

+ 25 - 11
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1540,7 +1540,9 @@ 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
+          if (res.data.data[0].tenantId !== "681169") {
+            row.purchaseAmount = res.data.data[0].stockPrice
+          }
         }
 
       })
@@ -1802,8 +1804,10 @@ 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
 
+            if (res.data.data[0].tenantId !== "681169") {
+              this.goodsShowData[row.$index].purchaseAmount = res.data.data[0].stockPrice
+            }
           }
 
         })
@@ -2246,8 +2250,9 @@ 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
-
+          if (res.data.data[0].tenantId !== "681169") {
+            row.purchaseAmount = res.data.data[0].stockPrice
+          }
         }
       })
       row.integralMultiples = event[0].integralMultiples
@@ -2284,8 +2289,9 @@ 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
-
+            if (res.data.data[0].tenantId !== "681169") {
+              this.goodsShowData[this.choiceIndexT].purchaseAmount = res.data.data[0].stockPrice
+            }
           }
         })
       }
@@ -2359,8 +2365,10 @@ 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)
+            if (res.data.data[0].tenantId !== "681169") {
+              this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].stockPrice)
 
+            }
           }
 
           // this.goodsListSave[item].storageQuantity =  res.data.data
@@ -2444,7 +2452,9 @@ 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;
+            if (res.data.data[0].tenantId !== "681169") {
+              this.tableData[item].purchaseAmount = res.data.data[0].stockPrice;
+            }
           }
           console.log('1', res.data.data);
           this.tableData[item].priceCategory = this.tableData[item].goodsTypeName;
@@ -2665,8 +2675,10 @@ 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 (res.data.data[0].tenantId !== "681169") {
+              this.$set(list[item], 'purchaseAmount', res.data.data[0].stockPrice)
 
+            }
           }
           if (listLength != 0) {
             this.$set(buyFree[item], 'storageQuantityList', res.data.data)
@@ -3748,12 +3760,14 @@ export default {
           tradeType: 'GN',
           storageId: this.form.storageId
         }).then(res => {
-          if(res.data.data.length > 0){
+          if (res.data.data.length > 0) {
             item.storageQuantityList = res.data.data
             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
+            if (res.data.data[0].tenantId !== "681169") {
+              item.purchaseAmount = res.data.data[0].stockPrice
+            }
           }
 
         })

+ 15 - 13
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -77,10 +77,7 @@
                     </el-tab-pane>
                 </el-tabs>
             </trade-card>
-            <report-dialog
-              :switchDialog="switchDialog"
-              @onClose="onClose()"
-            ></report-dialog>
+            <report-dialog :switchDialog="switchDialog" @onClose="onClose()"></report-dialog>
         </div>
     </div>
 </template>
@@ -94,8 +91,8 @@ export default {
     name: "detailsPage",
     data() {
         return {
-            isDisabled:false,
-            switchDialog:false,
+            isDisabled: false,
+            switchDialog: false,
             activeName: "sale_detail",
             disabled: false,
             key: 0,
@@ -351,7 +348,7 @@ export default {
                     overHidden: true,
                     width: 100,
                     disabled: false,
-                }, 
+                },
                 {
                     label: '发货数量',
                     prop: 'sendNum',
@@ -455,7 +452,7 @@ export default {
             }
         }
     },
-    components:{reportDialog},
+    components: { reportDialog },
     props: {
         onLoad: Object,
         detailData: Object
@@ -494,7 +491,7 @@ export default {
         } else if (this.onLoad.id) {
             this.refresh(this.onLoad.id, true)
         }
-        
+
     },
     methods: {
         generateOutbound() {
@@ -559,9 +556,14 @@ export default {
                 this.form = res.data.data
                 // console.log(this.form.businessSource);
                 loading.close();
-                if(this.form.businessSource == "外部销售"){
-                    this.optionContactsBack.column.forEach(item=>{
-                        item.disabled = true
+                if (this.form.businessSource == "外部销售") {
+                    this.$set(this.optionContactsBack,"addBtn",false)
+                    this.optionContactsBack.column.forEach(item => {
+                        if (item.prop == 'dot') {
+                            this.$set(item,disabled,false)
+                        } else {
+                            this.$set(item,disabled,true)
+                        }
                     })
                 }
             }).catch(() => {
@@ -594,7 +596,7 @@ export default {
         },
         //打印
         handlePrint() {
-            this.switchDialog = !this.switchDialog; 
+            this.switchDialog = !this.switchDialog;
         },
         onClose(val) {
             this.switchDialog = val;