Browse Source

修改bug

lichao 3 năm trước cách đây
mục cha
commit
2b8643672c

+ 1 - 1
src/views/basicData/productInformation/configuration/mainList.json

@@ -46,7 +46,7 @@
       ]
     },
     {
-      "label": "产品名称(模糊)",
+      "label": "品名快捷查询",
       "prop": "cnameInt",
       "search": true,
       "width": 100,

+ 5 - 0
src/views/basicData/productInformation/detailsPageEdit.vue

@@ -376,6 +376,11 @@ export default {
             span: 8
           },
           {
+            label: "品名快捷查询",
+            prop: "cnameInt",
+            span: 8
+          },
+          {
             label: "备注",
             prop: "remarks",
             type: "textarea",

+ 12 - 3
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -28,7 +28,7 @@
           type="primary"
           size="small"
           :disabled="detailData.seeDisabled || arrivalDisabled"
-          v-if="form.deliveryStatus == '已货'"
+          v-if="form.deliveryStatus == '已货'"
           :loading="saveLoading"
           @click="confirmArrival"
         >确认到货</el-button>
@@ -37,7 +37,7 @@
           type="primary"
           @click="revokeOutGoods"
           size="small"
-          v-if="form.deliveryStatus == '已货'"
+          v-if="form.deliveryStatus == '已货'"
           :loading="saveLoading"
           :disabled="detailData.seeDisabled || arrivalDisabled"
         >撤销收货</el-button>
@@ -142,6 +142,7 @@
               @saveColumn="saveColumn('goods')"
               @resetColumn="resetColumn"
               :cell-style="goodsRowClassName"
+              :key="crudIndex"
           >
             <template slot="headerSerial">
               <el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini" @click="$refs.crudContact.rowCellAdd()"></el-button>
@@ -807,6 +808,7 @@ export default {
       arrivalDisabled: false,
       switchDialog: false,
       userList: [],
+      crudIndex: 0,
     }
   },
   mounted() {
@@ -969,6 +971,13 @@ export default {
       this.queryData(id, true)
     }
     this.oldForm = Object.assign({}, this.form)
+    this.customerContact.height = window.innerHeight - 240;
+    this.crudIndex++;
+  },
+  updated() {
+    this.$nextTick(() => {
+      this.$refs.crudContact.doLayout();
+    })
   },
   watch: {
   },
@@ -978,7 +987,7 @@ export default {
       this.saveLoading = true
       detail(id).then(res => {
         this.form = res.data.data;
-        if (this.form.deliveryStatus == '已货') {
+        if (this.form.deliveryStatus == '已货') {
           this.deliverDisabled = true;
           this.arrivalDisabled = false;
         } else if (this.form.deliveryStatus == '已到货') {

+ 9 - 0
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -152,6 +152,7 @@
               @selection-change="productSelection"
               @saveColumn="saveColumn('goods')"
               @resetColumn="resetColumn"
+              :key="crudIndex"
           >
             <template slot="headerSerial" slot-scope="{column}">
               <el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini" @click="$refs.crudContact.rowCellAdd()"></el-button>
@@ -847,6 +848,7 @@ export default {
       applyPaymentList: [],
       messageVisble: false,
       purchasePriceOption: [],
+      crudIndex: 0,
     }
   },
   mounted() {
@@ -890,6 +892,13 @@ export default {
       this.queryData(this.detailData.copyId, true)
     } else {
     }
+    this.customerContact.height = window.innerHeight - 240;
+    this.crudIndex++;
+  },
+  updated() {
+    this.$nextTick(() => {
+      this.$refs.crudContact.doLayout();
+    })
   },
   watch: {
   },

+ 58 - 24
src/views/businessManagement/purchaseOrder/index.vue

@@ -70,7 +70,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
-            :disabled="scope.row.status > 0 || scope.row.createFreight == 1"
+            :disabled="scope.row.item.length == 0 || scope.row.createFreight == 1"
           >删除
           </el-button>
         </template>
@@ -122,6 +122,8 @@
         :checkData="financeData"
         :arrList="applyPaymentList"
         @choceFun="choceFun"
+        tradeType="GN"
+        @submit="feeSubmit"
       >
       </financial-account>
     </el-dialog>
@@ -402,10 +404,8 @@ export default {
       done()
     },
     searchReset() {
-      console.log('1')
     },
     selectionChange(list) {
-      console.log(list)
       this.selection = []
       this.selection = list;
       this.single = list.length !== 1;
@@ -516,29 +516,60 @@ export default {
       let a = []
       this.selection.forEach(item => {
         item.itemsList = item.itemsList? item.itemsList: [];
-        item.itemsList.forEach(e => {
-          let form = {
-            srcOrderno:item.orderNo,
-            itemType:"采购",
-            optionType:"GN",
-            corpsName: [{cname: item.strCorpName, id: item.id}],
-            corpId:item.corpId,
-            srcParentId: item.id,
-            currency: 'CNY',
-            exchangeRate: '1',
-            taxRate: '0',
-            accDate: item.businesDate,
-            srcType: 1,
-            tradeType: 'GN',
-            costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
-            goodName: e.goodsName,
-            price: e.price,
-            quantity: e.orderQuantity,
-            unit: e.unit,
-            amount: e.amount,
+        let amount = Number(item.debitAmount) - Number(item.settlmentAmount);
+        let quantity = 0;
+        item.itemsList.map(e => {
+          if (e.submitPay != 1) {
+            // amount += Number(e.amount)
+            quantity += Number(e.orderQuantity)
           }
-          a.push(form)
         })
+        const price = quantity === 0? 0: Number(amount) / Number(quantity)
+        let form = {
+          belongCompany: item.belongCompany,
+          srcOrderno:item.orderNo,
+          itemType:"采购",
+          corpsName:[{cname: item.strCorpName, id: item.id}],
+          corpId:item.corpId,
+          srcParentId: item.id,
+          currency: 'CNY',
+          exchangeRate: '1',
+          taxRate: '0',
+          accDate: item.businesDate,
+          srcType: 1,
+          tradeType: 'GN',
+          optionType: 'GN',
+          costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+          amount,
+          quantity,
+          price,
+          unit: '条',
+          remarks: item.orderRemark,
+        }
+        a.push(form)
+        // item.itemsList.forEach(e => {
+        //   let form = {
+        //     srcOrderno:item.orderNo,
+        //     itemType:"采购",
+        //     optionType:"GN",
+        //     corpsName: [{cname: item.strCorpName, id: item.id}],
+        //     corpId:item.corpId,
+        //     srcParentId: item.id,
+        //     currency: 'CNY',
+        //     exchangeRate: '1',
+        //     taxRate: '0',
+        //     accDate: item.businesDate,
+        //     srcType: 1,
+        //     tradeType: 'GN',
+        //     costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
+        //     goodName: e.goodsName,
+        //     price: e.price,
+        //     quantity: e.orderQuantity,
+        //     unit: e.unit,
+        //     amount: e.amount,
+        //   }
+        //   a.push(form)
+        // })
       })
       this.applyPaymentList = [...a]
       // this.beforeBillData(true);
@@ -553,6 +584,9 @@ export default {
     choceFun(){
       this.financialAccountDialog  = false
     },
+    feeSubmit() {
+      this.onLoad(this.page, this.search)
+    },
     // 生成工厂发货
     createPlant(row, index) {
       let ids = [];

+ 11 - 2
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -25,7 +25,7 @@
           type="primary"
           @click="revokeInGoods"
           size="small"
-          v-if="form.deliveryStatus !== '录入'"
+          v-if="form.deliveryStatus === '已发货'"
           :loading="saveLoading"
           :disabled="detailData.seeDisabled"
         >撤销发货</el-button>
@@ -49,7 +49,7 @@
         <el-button
           class="el-button--small-yh"
           type="primary"
-          :disabled="disabled || detailData.seeDisabled"
+          :disabled="disabled || detailData.seeDisabled || receiveDisabled"
           @click="editCustomer(false)"
           size="small"
           :loading="saveLoading"
@@ -144,6 +144,7 @@
               @row-del="rowDel"
               @saveColumn="saveColumn('goods')"
               @resetColumn="resetColumn"
+              :key="crudIndex"
           >
             <template slot="headerSerial">
               <el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini" @click="$refs.crudContact.rowCellAdd()"></el-button>
@@ -713,6 +714,7 @@ export default {
       receiveDisabled: false,
       messageVisble:false,
       GYSInfo: [], //供应商发货方信息
+      crudIndex: 0,
     }
   },
   mounted() {
@@ -822,6 +824,13 @@ export default {
     } else if (this.detailData.copyId) {
       this.queryData(this.detailData.copyId, true)
     }
+    this.customerContact.height = window.innerHeight - 240;
+    this.crudIndex++;
+  },
+  updated() {
+    this.$nextTick(() => {
+      this.$refs.crudContact.doLayout();
+    })
   },
   watch: {
   },

+ 3 - 4
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -18,7 +18,7 @@
                      :loading="buttonLoading"
                      :disabled="!form.id || editDisable"
                      @click.stop="confirmSettlement"
-          >{{financeButton?"付费":"撤销付费"}}
+          >{{financeDisabled?"付费":"撤销付费"}}
           </el-button>
           <el-button class="el-button--small-yh"
                      type="primary"
@@ -582,8 +582,6 @@
                   return this.$message.error(`第${i + 1}行的本次金额不能为空`);
                 }
               }
-
-              this.buttonLoading = true
               this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
 
               if (this.category == 2 && this.financeDisabled) {
@@ -608,6 +606,7 @@
                 billType:"付费",
                 itemsList:this.dataList
               }
+              this.buttonLoading = true
               if(this.financeButton){
                 modify(params).then(res =>{
                   this.$message.success("操作成功!")
@@ -665,6 +664,7 @@
       },
       async afterEcho(data){
         this.form = data;
+        this.financeDisabled =  this.form.financeStatus == "待结算"?true:false;
         if (this.category == 2) {
           await getCorpDetail({corpId: this.form.corpId}).then(res => {
             if (Number(this.form.overPayment) != (res.data.data? res.data.data.balanceOverpaymen: '0.00')) {
@@ -673,7 +673,6 @@
           })
         }
         this.oldForm = Object.assign({},this.form);
-        this.financeDisabled =  this.form.financeStatus == "待结算"?true:false;
         //审核状态为空时  说明为新单进来
         if(this.financeDisabled || !this.editDisable){
           this.financeButton = true

+ 3 - 4
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -617,7 +617,7 @@
                   return this.$message.error(`第${i + 1}行的本次金额不能为空`);
                 }
               }
-              this.buttonLoading = true
+
               this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
 
               if (this.category == 2 && this.financeDisabled) {
@@ -642,7 +642,7 @@
                 billType:"收费",
                 itemsList:this.dataList
               }
-
+              this.buttonLoading = true
               if(this.financeDisabled){
                 modify(params).then(res =>{
                   this.$message.success("操作成功!")
@@ -700,6 +700,7 @@
       },
       async afterEcho(data){
         this.form = data;
+        this.financeDisabled = this.form.financeStatus === "待结算"?true:false;
         // 溢付款余额获取
         if (this.category == 2) {
           await getCorpDetail({corpId: this.form.corpId}).then(res => {
@@ -710,8 +711,6 @@
         }
         this.oldForm = Object.assign({},this.form);
 
-        this.financeDisabled = this.form.financeStatus === "待结算"?true:false;
-
         if(this.financeDisabled || !this.editDisable){
           this.option.column.forEach(item =>{
             if( item.prop === "remark"){