lichao 3 سال پیش
والد
کامیت
0daf6a91ac

+ 33 - 10
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -99,6 +99,14 @@
                 </el-select>
                 <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
                                  :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled || arrivalDisabled || deliverDisabled"/>
+                <el-select v-else-if="item.prop === 'chargeMember'"
+                           v-model="form[item.prop]" placeholder="请选择"
+                           filterable
+                           size="small"
+                           style="width: 100%;"
+                           :disabled="detailData.seeDisabled">
+                  <el-option v-for="(item,index) in userList" :key="index" :label="item.realName" :value="item.realName"></el-option>
+                </el-select>
                 <el-input
                   v-else-if="item.type == 'number'"
                   placeholder="请输入"
@@ -474,6 +482,7 @@ import {
   IntegerFormat
 } from "@/util/validate";
 import reportDialog from "@/components/report-dialog/main";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "detailsPage",
@@ -806,6 +815,16 @@ export default {
               }
             ]
           },{
+            label: '业务员',
+            prop: 'chargeMember',
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'change'
+              }
+            ]
+          },{
             label: "备注",
             span: 24,
             type: 'textarea',
@@ -850,6 +869,7 @@ export default {
       // 确认到货禁用
       arrivalDisabled: false,
       switchDialog: false,
+      userList: [],
     }
   },
   mounted() {
@@ -910,6 +930,9 @@ export default {
     selectWareHouse().then(res => {
       this.warehouseName = res.data.data.records
     })
+    gainUser().then(res => {
+      this.userList = res.data.data;
+    });
     if (this.detailData.id) {
       let id = this.detailData.id
       this.queryData(id)
@@ -1147,7 +1170,7 @@ export default {
             })
           })
         } else if (type == '到货') {
-          if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+          if (this.goodsActives == 'gift') {
             this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
           } else {
             this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
@@ -1587,7 +1610,7 @@ export default {
           this.contactsData.forEach(item => {
             this.$set(item, 'contractAmount', item.deliveryAmount)
           })
-          if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+          if (this.goodsActives == 'gift') {
             this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
           } else {
             this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
@@ -1635,7 +1658,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
@@ -1671,7 +1694,7 @@ export default {
           let getGoodsList = []
           let getGiftList = []
           let getFeeList = this.$refs.feeInfo.submitData()
-          if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+          if (this.goodsActives == 'gift') {
             getGiftList = this.goodsShowData
             getGoodsList = this.contactsData
           } else {
@@ -1695,7 +1718,7 @@ export default {
             })
           } else {
             //商品信息
-            if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+            if (this.goodsActives == 'gift') {
               this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
             } else {
               this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
@@ -1724,7 +1747,7 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           //商品信息
-          if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+          if (this.goodsActives == 'gift') {
             this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
           } else {
             this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
@@ -1752,7 +1775,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
@@ -1775,7 +1798,7 @@ export default {
           this.$message.info('已取消')
         })
       } else {
-        if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+        if (this.goodsActives == 'gift') {
           this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
         } else {
           this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
@@ -1792,7 +1815,7 @@ export default {
     },
     // 撤销到货
     cancelArrival() {
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
       } else {
         this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
@@ -1874,7 +1897,7 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }
     },
     // 商品表格加色

+ 18 - 10
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -84,6 +84,14 @@
       "overHidden": true
     },
     {
+      "label": "采购金额",
+      "prop": "orderAmount",
+      "search": false,
+      "index": 6,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=payment_term",
       "props": {
@@ -93,7 +101,7 @@
       "label": "付款方式",
       "prop": "paymentType",
       "search": true,
-      "index": 6,
+      "index": 7,
       "width": 100,
       "overHidden": true
     },
@@ -101,7 +109,7 @@
       "label": "预估运费",
       "prop": "oceanFreight",
       "search": false,
-      "index": 7,
+      "index": 8,
       "width": 100,
       "overHidden": true
     },
@@ -109,7 +117,7 @@
       "label": "包装要求",
       "prop": "packageRemarks",
       "search": true,
-      "index": 8,
+      "index": 9,
       "width": 100,
       "overHidden": true
     },
@@ -117,7 +125,7 @@
       "label": "公司户头",
       "prop": "banksAccountName",
       "search": true,
-      "index": 9,
+      "index": 10,
       "width": 100,
       "overHidden": true
     },
@@ -128,7 +136,7 @@
       "searchRange": true,
       "prop": "businesDate",
       "search": false,
-      "index": 10,
+      "index": 11,
       "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
@@ -139,7 +147,7 @@
       "label": "银行账号",
       "prop": "banks",
       "search": false,
-      "index": 11,
+      "index": 12,
       "width": 100,
       "overHidden": true
     },
@@ -147,7 +155,7 @@
       "label": "系统编号",
       "prop": "sysNo",
       "search": false,
-      "index": 12,
+      "index": 13,
       "width": 100,
       "overHidden": true
     },
@@ -155,7 +163,7 @@
       "label": "来源单号",
       "prop": "orgOrderNo",
       "search": false,
-      "index": 13,
+      "index": 14,
       "width": 100,
       "overHidden": true
     },
@@ -169,7 +177,7 @@
       "label": "制单人",
       "prop": "createUser",
       "search": true,
-      "index": 14,
+      "index": 15,
       "width": 100,
       "overHidden": true
     },
@@ -180,7 +188,7 @@
       "searchRange": true,
       "prop": "createTime",
       "search": true,
-      "index": 15,
+      "index": 16,
       "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",

+ 52 - 6
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -67,7 +67,7 @@
           size="small"
           class="el-button--small-yh"
           type="primary"
-          :disabled="disabled || detailData.seeDisabled || browse"
+          :disabled="disabled || detailData.seeDisabled"
           @click="editCustomer(false)"
           :loading="saveLoading"
         >保 存
@@ -241,6 +241,7 @@
           optionType="GN"
           itemType="采购"
           @beforeFinance="beforeFinance"
+          :corpId="form.corpId"
         />
 <!--        <containerTitle title="费用明细"></containerTitle>-->
 <!--        <basic-container style="margin-bottom: 10px">-->
@@ -492,7 +493,9 @@
     >
       <financial-account
         :billType="billType"
-        :billData="billData"
+        :billData="{}"
+        :arrList="applyPaymentList"
+        :checkData="financeData"
         @choceFun="choceFun"
       >
       </financial-account>
@@ -597,6 +600,7 @@ import financialAccount from "../../../components/finance/financialAccount";
 import reportDialog from "@/components/report-dialog/main";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
+import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
 
 export default {
   name: "detailsPage",
@@ -711,6 +715,7 @@ export default {
       },
       billType:"申请",  //账单类型
       billData:{},     //账单需要数据
+      financeData: {}, // 账单请核需要的路由
       applyPaymentDialog:false,//生成账单组件
       applicationDialog: false,// 申请记录
       dialogVisible: false,
@@ -775,7 +780,7 @@ export default {
             prop: 'packageRemarks',
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -889,6 +894,8 @@ export default {
       checkScheduleDialog: false,
       checkId: '',
       batchNo:'',
+      feesOption: [],
+      applyPaymentList: [],
     }
   },
   mounted() {
@@ -917,6 +924,9 @@ export default {
     this.getWorkDicts("packageRemarks").then(res => {
       this.packageOptions = res.data.data;
     });
+    feeList().then(res => {
+      this.feesOption = res.data.data.records
+    })
     if (this.detailData.check) {
       this.checkDisabled = true
       this.batchNo = this.detailData.check.batchNo
@@ -1016,6 +1026,8 @@ export default {
         if (isCopy) {
           delete this.form.sysNo;
           delete this.form.id
+          this.form.status = 0
+          this.browse = false
           this.contactsData.forEach(item => {
             delete item.id
             delete item.pid
@@ -1547,7 +1559,15 @@ export default {
       });
     },
     beforeBillData(bool,type){
+      this.applyPaymentList = [];
+      let arr = [];
       this.billType = type
+      this.financeData = {
+        url:"/financialManagement/paymentRequest/index",
+        pageStatus:"this.$store.getters.pqStatus",
+        pageLabel:"付费申请",
+        checkType: 'ffsq'
+      }
       //采购明细提单号 list
       this.billData = {
         srcOrderno:this.form.orderNo,
@@ -1562,10 +1582,36 @@ export default {
         srcType: 1,
         tradeType: 'GN',
         optionType: 'GN',
-        amount: this.form.orderAmount
+        amount: this.form.orderAmount,
+        costType: this.feesOption.find(e => e.cname == '货款').id
       }
+      arr.push(this.billData)
+      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2)
+      getFeeList.forEach(item => {
+        let form = {
+          srcOrderno:this.form.orgOrderNo,
+          itemType:"采购",
+          corpsName:item.corpName,
+          corpId: item.corpId,
+          srcParentId: this.form.id,
+          currency: 'CNY',
+          exchangeRate: '1',
+          taxRate: '0',
+          accDate: this.form.businesDate,
+          srcType: 2,
+          tradeType: 'GN',
+          optionType: 'GN',
+          chargeMember: this.form.chargeMember,
+          parentId: this.form.id,
+          amount: item.amount,
+          costType: item.itemId,
+          srcFeesId: item.id,
+        }
+        arr.push(form)
+      })
+      this.applyPaymentList = [...arr]
       if(bool){ //申请货款
-        this.billData.srcId = -1
+        // this.billData.srcId = -1
       }
     },
     // 查看申请记录
@@ -1652,7 +1698,7 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }
     },
     returnBack(row) {

+ 9 - 3
src/views/businessManagement/purchaseOrder/index.vue

@@ -113,6 +113,7 @@
         v-if="financialAccountDialog"
         :billType="billType"
         :billData="billData"
+        :checkData="financeData"
         :arrList="applyPaymentList"
         @choceFun="choceFun"
       >
@@ -172,6 +173,12 @@ export default {
       detailData: {},
       billType:"申请",  //账单类型
       billData:{},     //账单需要数据
+      financeData: {
+        url:"/financialManagement/paymentRequest/index",
+        pageStatus:"this.$store.getters.pqStatus",
+        pageLabel:"付费申请",
+        checkType: 'ffsq'
+      }, // 账单请核需要的路由
       applyPaymentDialog:false,//生成账单组件
       financialAccountDialog:false,
       applyPaymentList: [],
@@ -179,8 +186,8 @@ export default {
   },
   async created() {
     this.search.requiredArrivalDate = defaultDate(1)
-    this.option = option
-    // this.option = await this.getColumnData(this.getColumnName(17), option);
+    // this.option = option
+    this.option = await this.getColumnData(this.getColumnName(17), option);
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -258,7 +265,6 @@ export default {
     //查询全部
     initData() {
       customerList().then(res => {
-        console.log(this.form);
         const column = this.findObject(this.option.column, "parentId");
         column.dicData = res.data.data.records;
       });

+ 23 - 19
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -58,44 +58,44 @@
                 <!--                <avue-input-tree v-if="item.prop === 'corpsTypeId'"  leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"-->
                 <!--                ></avue-input-tree>-->
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
-                                size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="detailData.seeDisabled"/>
+                                size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="detailData.seeDisabled || receiveDisabled"/>
                 <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
                                 size="small" type="date" placeholder="选择日期"
-                                :disabled="detailData.seeDisabled"/>
+                                :disabled="detailData.seeDisabled || receiveDisabled"/>
                 <crop-select
                   v-else-if="item.prop === 'corpId'"
                   v-model="form[item.prop]"
                   corpType="GYS"
-                  :disabled="detailData.seeDisabled"
+                  :disabled="detailData.seeDisabled || receiveDisabled"
                 ></crop-select>
                 <crop-select
                   v-else-if="item.prop === 'salesCompany'"
                   v-model="form[item.prop]"
                   corpType="GS"
-                  :disabled="detailData.seeDisabled"
+                  :disabled="detailData.seeDisabled || receiveDisabled"
                 ></crop-select>
 <!--                <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"-->
 <!--                                 :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
 <!--                <selectComponent v-else-if="item.prop === 'salesCompany'" v-model="form[item.prop]"-->
 <!--                                 :configuration="companyConfiguration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
-                <el-select v-else-if="item.prop === 'purchaseMode'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
+                <el-select v-else-if="item.prop === 'purchaseMode'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || receiveDisabled">
                   <el-option v-for="(item,index) in procurementMethodOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
-                <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
+                <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || receiveDisabled">
                   <el-option v-for="(item,index) in warehouseTypeOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
                 <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
-                                  :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled"/>
+                                  :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled || receiveDisabled"/>
                 <el-input
                   v-else-if="item.type == 'number'"
                   placeholder="请输入"
                   v-input-limit="2"
                   size="small"
-                  :disabled="item.disabled || detailData.seeDisabled"
+                  :disabled="item.disabled || detailData.seeDisabled || receiveDisabled"
                   v-model.trim="form[item.prop]"
                 />
-                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
-                <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled"></el-input>
+                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || receiveDisabled"></el-input>
+                <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || receiveDisabled"></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -123,7 +123,7 @@
                   type="text"
                   size="small"
                   @click="rowCell(row,index)"
-                  :disabled="detailData.seeDisabled"
+                  :disabled="detailData.seeDisabled || receiveDisabled"
               >{{ row.$cellEdit ? '保存' : '修改' }}
               </el-button>
               <el-button
@@ -131,7 +131,7 @@
                 icon="el-icon-delete"
                 type="text"
                 @click="rowDel(row, index)"
-                :disabled="detailData.seeDisabled"
+                :disabled="detailData.seeDisabled || receiveDisabled"
                 v-if="!row.$cellEdit"
               >删 除</el-button>
             </template>
@@ -149,7 +149,7 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="commoditySelection"
-                         :disabled="detailData.seeDisabled"
+                         :disabled="detailData.seeDisabled || receiveDisabled"
               >录入明细
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -159,7 +159,7 @@
         <fee-info
           ref="feeInfo"
           :orderFeesList="advantageProjectData"
-          :disabled="detailData.seeDisabled"
+          :disabled="detailData.seeDisabled || receiveDisabled"
           @beforeFinance="beforeFinance"
           :srcType="3"
           optionType="GN"
@@ -247,7 +247,7 @@
                 icon="el-icon-plus"
                 size="small"
                 @click.stop="$refs.uploadCrud.rowAdd()"
-                :disabled="detailData.seeDisabled"
+                :disabled="detailData.seeDisabled || receiveDisabled"
               >上传</el-button
               >
             </template>
@@ -257,7 +257,7 @@
                 icon="el-icon-edit"
                 type="text"
                 @click="$refs.uploadCrud.rowEdit(row, index)"
-                :disabled="detailData.seeDisabled"
+                :disabled="detailData.seeDisabled || receiveDisabled"
               >编 辑</el-button
               >
               <el-button
@@ -265,7 +265,7 @@
                 icon="el-icon-delete"
                 type="text"
                 @click="rowDelBankOfDeposit(row, index)"
-                :disabled="detailData.seeDisabled"
+                :disabled="detailData.seeDisabled || receiveDisabled"
               >删 除</el-button
               >
             </template>
@@ -705,6 +705,8 @@ export default {
       rowHeight: '',
       // 查询时loading页面
       pageLoading: false,
+      // 收货禁用
+      receiveDisabled: false,
     }
   },
   mounted() {
@@ -816,6 +818,7 @@ export default {
       this.pageLoading = true
       detail(id).then(res => {
         this.form = res.data.data;
+        this.receiveDisabled = this.form.deliveryStatus == '录入'? false: true
         this.contactsData = this.form.deliveryItemsList
         this.advantageProjectData = this.form.deliveryFeesList
         this.bankOfDepositData = this.form.deliveryFilesList
@@ -890,7 +893,8 @@ export default {
             delete item.id
             delete item.pid
           })
-          this.form.deliveryStatus == '录入'
+          this.form.deliveryStatus = '录入'
+          this.receiveDisabled = false;
         }
       }).finally(() => {
         this.saveLoading = false
@@ -1418,7 +1422,7 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }
     },
     //费用明细回调

+ 15 - 0
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -130,6 +130,21 @@
         }
       ]
     },{
+      "label": "质量胎",
+      "prop": "shopQuality",
+      "index": 4,
+      "width":140,
+      "cell": false,
+      "slot": true,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请选择",
+          "trigger": "blur"
+        }
+      ]
+    },{
       "label": "订货数量",
       "prop": "orderQuantity",
       "index": 5,

+ 76 - 14
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -72,7 +72,7 @@
         <el-button
           class="el-button--small-yh"
           type="primary"
-          :disabled="disabled || detailData.seeDisabled || browse"
+          :disabled="disabled || detailData.seeDisabled"
           :loading="saveLoading"
           size="small"
           @click="editCustomer(false)"
@@ -316,6 +316,15 @@
                 {{row.cname}}
               </span>
             </template>
+            <template slot="shopQuality" slot-scope="{ row, index }">
+              <el-switch
+                v-model="row.shopQuality"
+                :disabled="!row.$cellEdit"
+                :active-value="1"
+                :inactive-value="0"
+                @change="(val) => shopQualityChange(val, row)"
+              ></el-switch>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                   type="text"
@@ -412,6 +421,7 @@
           optionType="GN"
           itemType="销售"
           @beforeFinance="beforeFinance"
+          :corpId="form.corpId"
         />
 <!--        <containerTitle title="费用明细"></containerTitle>-->
 <!--        <basic-container style="margin-bottom: 10px">-->
@@ -693,8 +703,9 @@
     >
       <apply-payment
         :billType="billType"
-        :billData="billData"
+        :billData="{}"
         itemType="销售"
+        :arrList="applyPaymentList"
         @choceFun="choceFun"
       >
       </apply-payment>
@@ -720,7 +731,8 @@
     >
       <financial-account
         :billType="billType"
-        :billData="billData"
+        :billData="{}"
+        :arrList="applyPaymentList"
         @choceFun="choceFun"
       >
       </financial-account>
@@ -840,6 +852,7 @@ import financialAccount from "../../../components/finance/financialAccount";
 import { gainUser } from "@/api/basicData/customerInquiry";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
+import { customerList as feeList } from "@/api/basicData/basicFeesDesc";
 
 export default {
   name: "detailsPage",
@@ -1429,7 +1442,7 @@ export default {
             prop: 'packageRemarks',
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'change'
               }
@@ -1571,12 +1584,14 @@ export default {
       browse: false,
       roleName: '',
       userList: [],
+      feesOption: [],
       checkDisabled: false,
       checkData: {},
       checkDialog: false,
       checkScheduleDialog: false,
       checkId: '',
       batchNo:'',
+      applyPaymentList: [],
     }
   },
   mounted() {
@@ -1625,6 +1640,9 @@ export default {
     gainUser().then(res => {
       this.userList = res.data.data;
     });
+    feeList().then(res => {
+      this.feesOption = res.data.data.records
+    })
     if (this.detailData.seeDisabled) {
       // this.bankOfDeposit.column.forEach(item => {
       //   item.editDisabled = true
@@ -1737,6 +1755,8 @@ export default {
         this.oldUploadList = this.deepClone(this.bankOfDepositData)
         if (isCopy) {
           this.$set(this.form, 'orderStatus', '录入')
+          this.form.status = 0
+          this.browse = false
           delete this.form.id
           delete this.form.orgOrderNo
           delete this.form.orderNo
@@ -1814,7 +1834,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
@@ -2004,7 +2024,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
@@ -2056,7 +2076,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
@@ -2084,6 +2104,8 @@ export default {
     },
     //生成账单 拿到主表信息
     beforeBillData(bool,type){
+      this.applyPaymentList = [];
+      let arr = [];
       this.billType = type
       this.billData = {
         srcOrderno:this.form.orgOrderNo,
@@ -2099,10 +2121,36 @@ export default {
         tradeType: 'GN',
         optionType: 'GN',
         chargeMember: this.form.chargeMember,
-        amount: this.form.balanceAmount
+        amount: this.form.balanceAmount,
+        costType: this.feesOption.find(e => e.cname == '货款').id
       }
+      arr.push(this.billData)
+      let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1)
+      getFeeList.forEach(item => {
+        let form = {
+          srcOrderno:this.form.orgOrderNo,
+          itemType:"销售",
+          corpsName:this.form.corpName,
+          corpId:this.form.corpId,
+          srcParentId: this.form.id,
+          currency: 'CNY',
+          exchangeRate: '1',
+          taxRate: '0',
+          accDate: this.form.businesDate,
+          srcType: 2,
+          tradeType: 'GN',
+          optionType: 'GN',
+          chargeMember: this.form.chargeMember,
+          parentId: this.form.id,
+          amount: item.amount,
+          costType: item.itemId,
+          srcFeesId: item.id,
+        }
+        arr.push(form)
+      })
+      this.applyPaymentList = [...arr]
       if(bool){ //申请货款
-        this.billData.srcId = -1
+        // this.billData.srcId = -1
       }
     },
     //关闭账单
@@ -2304,6 +2352,7 @@ export default {
           this.$set(this.goodsListSave[item], 'orderQuantity', 1)
           this.$set(this.goodsListSave[item], 'actualQuantity', 0)
           this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
+          this.$set(this.goodsListSave[item], 'shopQuality', 0)
           this.goodsListSave[item].amount = 0
           if (this.goodsActives == "goods") {
             this.$set(this.goodsListSave[item], 'goodType', 0)
@@ -2366,6 +2415,7 @@ export default {
           this.$set(this.tableData[item], 'itemType', this.tableData[item].typeno)
           this.$set(this.tableData[item], 'orderQuantity', 1)
           this.$set(this.tableData[item], 'actualQuantity', 0)
+          this.$set(this.tableData[item], 'shopQuality', 0)
           this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight)
           this.tableData[item].amount = 0
           if (this.goodsActives == "goods") {
@@ -2535,6 +2585,7 @@ export default {
           // 积分
           this.$set(list[item], 'integralMultiples', 0)
           this.$set(list[item], 'integral', 0)
+          this.$set(list[item], 'shopQuality', 0)
 
           if (listLength != 0) {
             this.$set(buyFree[item], 'actualQuantity', 0)
@@ -2548,6 +2599,7 @@ export default {
             // 积分
             this.$set(buyFree[item], 'integralMultiples', 0)
             this.$set(buyFree[item], 'integral', 0)
+            this.$set(buyFree[item], 'shopQuality', 0)
             this.maxGoodsNum++
             delete buyFree[item].id
             delete buyFree[item].pid
@@ -2786,7 +2838,7 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           //商品信息
-          if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+          if (this.goodsActives == 'gift') {
             this.form.orderItemsList = this.goodsShowData.concat(this.contactsData)
           } else {
             this.form.orderItemsList = this.goodsShowData.concat(this.giftData)
@@ -2945,6 +2997,7 @@ export default {
     priceChange(row) {
       if (!row.price) {
         row.price = 0;
+        row.amount = '0.00'
       } else {
         row.amount = (row.price * row.orderQuantity).toFixed(2)
       }
@@ -2962,7 +3015,7 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
@@ -3020,7 +3073,7 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         //关闭窗口
-        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
       }
     },
     returnBack(row) {
@@ -3185,8 +3238,9 @@ export default {
     },
     // 请核
     pleaseCheck() {
+      const giftList = this.goodsActives == 'gift'? this.goodsShowData: this.giftData
       if (this.verification()) {
-        this.$confirm("您确定提交此次申请吗?", {
+        this.$confirm(giftList.length == 0?"此单没有赠品,确定提交此次审批吗?": "您确定提交此次申请吗?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -3217,13 +3271,17 @@ export default {
       let getGoodsList = []
       let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
-      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+      // this.goodsShowData.findIndex(item => item.goodType == 0) == -1
+      if (this.goodsActives == 'gift') {
         getGiftList = this.goodsShowData
         getGoodsList = this.contactsData
       } else {
+        console.log(this.giftData)
         getGoodsList = this.goodsShowData
         getGiftList = this.giftData
       }
+      console.log(getGiftList)
+      console.log(this.oldGiftList)
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
         contrastList(getGiftList, this.oldGiftList) ||
@@ -3255,6 +3313,10 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+    shopQualityChange(val, row) {
+      (val == 1) && (row.price = 0)
+      this.priceChange(row)
+    },
   },
 }
 </script>