Browse Source

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 years ago
parent
commit
cd8b10c6ee
22 changed files with 447 additions and 217 deletions
  1. 14 13
      src/components/finance/applyPayment.vue
  2. 1 1
      src/components/goodsSelect/index.vue
  3. 1 1
      src/views/businessManagement/deliveryNotice/configuration/mainList.json
  4. 36 16
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  5. 17 8
      src/views/businessManagement/deliveryNotice/index.vue
  6. 1 1
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  7. 1 1
      src/views/businessManagement/purchaseOrder/configuration/mainList.json
  8. 100 25
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  9. 11 8
      src/views/businessManagement/purchaseOrder/index.vue
  10. 1 1
      src/views/businessManagement/receipt/configuration/mainList.json
  11. 43 26
      src/views/businessManagement/receipt/detailsPageEdit.vue
  12. 17 8
      src/views/businessManagement/receipt/index.vue
  13. 15 0
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  14. 126 37
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  15. 1 1
      src/views/importTrade/receipt/detailsPageEdit.vue
  16. 7 4
      src/views/maintenance/salesPolicy/detailsPageEdit.vue
  17. 1 25
      src/views/orderManagement/orderDetail/index.vue
  18. 16 12
      src/views/purchase/contract/detailsPage.vue
  19. 1 1
      src/views/workManagement/main-items/configuration/mainList.json
  20. 26 22
      src/views/workManagement/main-items/detailsPage.vue
  21. 10 5
      src/views/workManagement/receipt/settleAccountsDetailsPage.vue
  22. 1 1
      src/views/workManagement/task/configuration/mainList.json

+ 14 - 13
src/components/finance/applyPayment.vue

@@ -109,7 +109,7 @@
             menuSpan: 8,
             column: [
               {
-                label: '合同号',
+                label: '订单号',
                 prop: 'srcOrderno',
                 span: 8,
                 disabled:true,
@@ -133,18 +133,18 @@
                   }
                 ]
               },
-              {
-                label: '提单号',
-                prop: 'billNo',
-                span: 8,
-                rules: [
-                  {
-                    required: true,
-                    message: ' ',
-                    trigger: 'blur'
-                  }
-                ]
-              },
+              // {
+              //   label: '提单号',
+              //   prop: 'billNo',
+              //   span: 8,
+              //   rules: [
+              //     {
+              //       required: true,
+              //       message: ' ',
+              //       trigger: 'blur'
+              //     }
+              //   ]
+              // },
               {
                 label: '费用名称',
                 prop: 'costType',
@@ -334,6 +334,7 @@
           if (result.some(item => item)) {
             const itemsList =  this.list.map(item =>{ item.form.corpId = this.corpId; return item.form})
             const params = {
+              billNo:"0000001",
               billType : this.billType,
               itemsList: itemsList
             }

+ 1 - 1
src/components/goodsSelect/index.vue

@@ -289,7 +289,7 @@ export default {
     removeRepeat() {
       let obj = []
       this.configuration.dicData = this.configuration.dicData.reduce((current,next) => {
-        obj[next.id] ? '': obj[next.id] = true && current.push(next)
+        obj[next.cname] ? '': obj[next.cname] = true && current.push(next)
         return current
       }, [])
     },

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

@@ -12,7 +12,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 300,
+  "menuWidth": 130,
   "dialogClickModal": false,
   "searchLabelWidth": 100,
   "showSummary": true,

+ 36 - 16
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -1302,23 +1302,41 @@ export default {
           if (this.contactsData.length == 0) {
             return this.$message.error('商品信息为空')
           }
-          for (let item in this.contactsData) {
-            if (!this.contactsData[item].id) {
-              return this.$message.error('有商品未保存,请先保存')
+          // for (let item in this.contactsData) {
+          //   if (!this.contactsData[item].id) {
+          //     return this.$message.error('有商品未保存,请先保存')
+          //   }
+          // }
+          if (contrastObj(this.form, this.oldForm) ||
+            contrastList(this.contactsData, this.oldGoodsList) ||
+            contrastList(this.advantageProjectData, this.oldFeesList) ||
+            contrastList(this.bankOfDepositData, this.oldUploadList)
+          ) {
+            this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.editCustomer(false)
+            }).catch(() => {
+              this.$message.info('已取消')
+            })
+          } else {
+            //商品信息
+            this.form.deliveryItemsList = this.contactsData
+            this.form.deliveryFeesList = this.advantageProjectData
+            this.form.deliveryFilesList = this.bankOfDepositData
+            if (typeof this.form.corpsTypeId == 'object') {
+              this.form.corpsTypeId = this.form.corpsTypeId.join(",")
             }
+            this.pageLoading = true
+            sendOutGoods(this.form).then(res => {
+              this.$message.success('发货成功')
+              this.queryData(res.data.data.id)
+            }).finally(() => {
+              this.pageLoading = false
+            })
           }
-          //商品信息
-          this.form.deliveryItemsList = this.contactsData
-          this.form.deliveryFeesList = this.advantageProjectData
-          this.form.deliveryFilesList = this.bankOfDepositData
-          if (typeof this.form.corpsTypeId == 'object') {
-            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
-          }
-          sendOutGoods(this.form).then(res => {
-            console.log(res)
-            this.$message.success('发货成功')
-            this.queryData(res.data.data.id)
-          })
         } else {
           return false;
         }
@@ -1335,10 +1353,12 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
+          this.pageLoading = true
           revokeOutGoods(this.form).then(res => {
-            console.log(res)
             this.$message.success('撤销成功')
             this.queryData(res.data.data.id)
+          }).finally(() => {
+            this.pageLoading = false
           })
         } else {
           return false;

+ 17 - 8
src/views/businessManagement/deliveryNotice/index.vue

@@ -25,6 +25,9 @@
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
         </template>
+        <template slot-scope="scope" slot="orgOrderNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orgOrderNo }}</span>
+        </template>
         <template slot="corpIdSearch">
           <select-component
             v-model="search.corpId"
@@ -38,7 +41,7 @@
           ></select-component>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
         </template>
         <template slot-scope="scope" slot="salesCompany">
           {{ scope.row.salesCompanyName }}
@@ -56,13 +59,13 @@
           {{ scope.row.createUserName }}
         </template>
         <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-view"
-            size="small"
-            @click.stop="beforeOpenPage(scope.row,scope.index)"
-          >查看
-          </el-button>
+<!--          <el-button-->
+<!--            type="text"-->
+<!--            icon="el-icon-view"-->
+<!--            size="small"-->
+<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
+<!--          >查看-->
+<!--          </el-button>-->
           <el-button
             type="text"
             icon="el-icon-edit"
@@ -348,6 +351,12 @@ export default {
     },
     goBack() {
       this.detailData=this.$options.data().detailData
+      if (this.$route.query) {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/businessManagement/deliveryNotice/index"
+        });
+      }
       this.isShow = true;
       this.$store.commit("IN_OUT_DETAIL");
     },

+ 1 - 1
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -119,7 +119,7 @@
       "index": 6,
       "width":100,
       "cell": false,
-      "slot": true,
+      "slot": false,
       "overHidden": true,
       "rules": [
         {

+ 1 - 1
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -12,7 +12,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 300,
+  "menuWidth": 130,
   "dialogClickModal": false,
   "searchLabelWidth": 100,
   "searchIcon": true,

+ 100 - 25
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -11,7 +11,17 @@
         <el-button
           size="small"
           class="el-button--small-yh"
-          type="success" style="right: 140px;" @click="copyOrder"
+          :disabled="detailData.seeDisabled || !this.form.id"
+          type="warning" style="right: 140px;"
+          @click="applyPayment"
+        >
+          申请货款
+        </el-button>
+        <el-button
+          size="small"
+          class="el-button--small-yh"
+          type="success" style="right: 140px;"
+          @click="copyOrder"
           :disabled="detailData.seeDisabled || !this.form.id"
         >
           复制新单
@@ -346,6 +356,25 @@
                      :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
+
+    <el-dialog
+      title="账单"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applyPaymentDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <apply-payment
+        :billType="billType"
+        :billData="billData"
+        @choceFun="choceFun"
+      >
+      </apply-payment>
+    </el-dialog>
   </div>
 </template>
 
@@ -369,6 +398,8 @@ import optionTwoCost from "./configuration/mainListCost.json"
 import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import { contrastObj, contrastList } from "@/util/contrastData";
+//账单组件
+import ApplyPayment from "../../../components/finance/applyPayment";
 
 export default {
   name: "detailsPage",
@@ -380,6 +411,9 @@ export default {
       }
     }
   },
+  components:{
+    ApplyPayment
+  },
   data() {
     return {
       configuration: {
@@ -471,6 +505,9 @@ export default {
           children: 'children'
         }
       },
+      billType:"申请",  //账单类型
+      billData:{},     //账单需要数据
+      applyPaymentDialog:false,//生成账单组件
       dialogVisible: false,
       advantageProjectForm: {},
       bankOfDepositForm: {},
@@ -544,7 +581,7 @@ export default {
             prop: 'banksAccountName',
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -619,8 +656,9 @@ export default {
   //初始化查询
   async created() {
     this.rowHeight = (window.innerHeight - 130) + 'px'
-    // this.customerContact = customerContact
-    this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
+    this.customerContact = customerContact
+    console.log(this.customerContact)
+    // this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(19), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
       this.paymentOption = res.data.data
@@ -685,7 +723,7 @@ export default {
         delete this.form.itemsVOList
         delete this.form.orderFeesList
         delete this.form.orderFilesList
-        delete this.form.corpsName
+        // delete this.form.corpsName
         // 获取最大值
         let num = []
         this.advantageProjectData.forEach(item => {
@@ -763,7 +801,7 @@ export default {
     removeGoodsRepeat() {
       let obj = []
       this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current,next) => {
-        obj[next.id] ? '': obj[next.id] = true && current.push(next)
+        obj[next.cname] ? '': obj[next.cname] = true && current.push(next)
         return current
       }, [])
     },
@@ -796,25 +834,25 @@ export default {
         }).then(() => {
           this.editCustomer(false)
         }).catch(() => {
-          // this.$message({
-          //   type: 'info',
-          //   message: '已取消'
-          // });
-          this.selection.forEach(item => {
-            lsit.push(item.id)
-          })
-          // lsit.push(this.selection[item].id)
-          let data = {
-            id: this.form.id,
-            orderItemIds: lsit
-          }
-          generateShipment(data).then(res => {
-            this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
-            this.$router.push({
-              path: "/businessManagement/receipt/index",
-              query: {form: JSON.stringify(res.data.data)},
-            });
-          })
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
+          // this.selection.forEach(item => {
+          //   lsit.push(item.id)
+          // })
+          // // lsit.push(this.selection[item].id)
+          // let data = {
+          //   id: this.form.id,
+          //   orderItemIds: lsit
+          // }
+          // generateShipment(data).then(res => {
+          //   this.$router.$avueRouter.closeTag("/businessManagement/receipt/index");
+          //   this.$router.push({
+          //     path: "/businessManagement/receipt/index",
+          //     query: {form: JSON.stringify(res.data.data)},
+          //   });
+          // })
         })
       } else {
         // lsit.push(this.selection[item].id)
@@ -1211,6 +1249,43 @@ export default {
         }
       });
     },
+    beforeBillData(type){
+      //采购明细提单号 list
+      this.billData = {
+        srcOrderno:this.form.srcOrderNo,
+        itemType:"采购",
+        corpsName:this.form.corpsName,
+        corpId:this.form.corpId,
+      }
+      if(type){ //申请货款
+        this.billData.srcId = -1
+      }
+      console.log(this.billData )
+    },
+    //申请货款
+    applyPayment(){
+      // if (contrastObj(this.form, this.oldForm) ||
+      //   contrastList(this.contactsData, this.oldGoodsList) ||
+      //   contrastList(this.advantageProjectData, this.oldFeesList) ||
+      //   contrastList(this.bankOfDepositData, this.oldUploadList)
+      // ) {
+      //   this.$confirm("您已改动数据,是否先保存在进行操作!", {
+      //     confirmButtonText: "保存",
+      //     cancelButtonText: "取消",
+      //     type: "warning"
+      //   }).then(() => {
+      //     this.editCustomer();
+      //   })
+      // }else{
+        this.beforeBillData(true);
+        this.applyPaymentDialog = true;
+      // }
+
+    },
+    //关闭账单
+    choceFun(){
+      this.applyPaymentDialog  = false
+    },
     //返回列表
     backToList() {
       if (contrastObj(this.form, this.oldForm) ||

+ 11 - 8
src/views/businessManagement/purchaseOrder/index.vue

@@ -23,6 +23,9 @@
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
         </template>
+        <template slot-scope="scope" slot="orgOrderNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orgOrderNo }}</span>
+        </template>
         <template slot="corpIdSearch">
           <select-component
             v-model="search.corpId"
@@ -30,19 +33,19 @@
           ></select-component>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.strCorpName }}
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.strCorpName }}</span>
         </template>
         <template slot-scope="scope" slot="createUser">
           {{ scope.row.createUserName }}
         </template>
         <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-view"
-            size="small"
-            @click.stop="beforeOpenPage(scope.row,scope.index)"
-          >查看
-          </el-button>
+<!--          <el-button-->
+<!--            type="text"-->
+<!--            icon="el-icon-view"-->
+<!--            size="small"-->
+<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
+<!--          >查看-->
+<!--          </el-button>-->
           <el-button
             type="text"
             icon="el-icon-edit"

+ 1 - 1
src/views/businessManagement/receipt/configuration/mainList.json

@@ -12,7 +12,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 300,
+  "menuWidth": 130,
   "dialogClickModal": false,
   "searchLabelWidth": 100,
   "searchIcon": true,

+ 43 - 26
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -751,12 +751,13 @@ export default {
         this.$set(item, "inventoryNumber", item.storageQuantity)
         this.$set(item, "srcId", item.id)
         this.$set(item, "deliveryAmount", item.amount)
-        this.$set(item, "actualQuantity", (Number(item.purchaseQuantity) - Number(item.actualQuantity)))
+        this.$set(item, "purchaseQuantity", Number(item.orderQuantity))
+        this.$set(item, "actualQuantity", (Number(item.orderQuantity) - Number(item.actualQuantity)))
         // 入库数量和入库金额的比例
-        this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
-        this.form.deliveryAmount += Number(item.deliveryAmount)
-        this.form.totalQuantity += Number(item.actualQuantity)
-        this.form.purchaseAmount += Number(item.deliveryAmount)
+        this.$set(item, 'scale', Number(item.deliveryAmount / item.actualQuantity))
+        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.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
         this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
         delete item.id
@@ -857,9 +858,9 @@ export default {
     },
     // 入库数量变化时调用
     actualQuantityChange(row) {
-      if (row.scale) {
-        row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
-      }
+      // if (row.scale) {
+      //   row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
+      // }
     },
     // 类别变换时触发
     warehouseTreeChange(id) {
@@ -1206,23 +1207,36 @@ export default {
           if (this.contactsData.length == 0) {
             return this.$message.error('商品信息为空')
           }
-          for (let item in this.contactsData) {
-            if (!this.contactsData[item].id) {
-              return this.$message.error('有商品未保存,请先保存')
+          if (contrastObj(this.form, this.oldForm) ||
+            contrastList(this.contactsData, this.oldGoodsList) ||
+            contrastList(this.advantageProjectData, this.oldFeesList) ||
+            contrastList(this.bankOfDepositData, this.oldUploadList)
+          ) {
+            this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.editCustomer(false)
+            }).catch(() => {
+              this.$message.info('已取消')
+            })
+          } else {
+            //商品信息
+            this.form.deliveryItemsList = this.contactsData
+            this.form.deliveryFeesList = this.advantageProjectData
+            this.form.deliveryFilesList = this.bankOfDepositData
+            if (typeof this.form.corpsTypeId == 'object') {
+              this.form.corpsTypeId = this.form.corpsTypeId.join(",")
             }
+            this.pageLoading = true
+            sendInGoods(this.form).then(res => {
+              this.$message.success('收货成功')
+              this.queryData(res.data.data.id)
+            }).finally(() => {
+              this.pageLoading = false
+            })
           }
-          //商品信息
-          this.form.deliveryItemsList = this.contactsData
-          this.form.deliveryFeesList = this.advantageProjectData
-          this.form.deliveryFilesList = this.bankOfDepositData
-          if (typeof this.form.corpsTypeId == 'object') {
-            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
-          }
-          sendInGoods(this.form).then(res => {
-            console.log(res)
-            this.$message.success('收货成功')
-            this.queryData(res.data.data.id)
-          })
         } else {
           return false;
         }
@@ -1239,9 +1253,12 @@ export default {
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
+          this.pageLoading = true
           revokeInGoods(this.form).then(res => {
             this.$message.success('撤销成功')
             this.queryData(res.data.data.id)
+          }).finally(() => {
+            this.pageLoading = false
           })
         } else {
           return false;
@@ -1256,9 +1273,9 @@ export default {
           this.form.totalQuantity = 0
           this.form.purchaseAmount = 0
           this.contactsData.forEach(item => {
-            this.form.deliveryAmount += Number(item.deliveryAmount)
-            this.form.totalQuantity += Number(item.actualQuantity)
-            this.form.purchaseAmount += Number(item.deliveryAmount)
+            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.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
             this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
           })

+ 17 - 8
src/views/businessManagement/receipt/index.vue

@@ -25,6 +25,9 @@
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
         </template>
+        <template slot-scope="scope" slot="orgOrderNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orgOrderNo }}</span>
+        </template>
         <template slot="corpIdSearch">
           <select-component
             v-model="search.corpId"
@@ -32,7 +35,7 @@
           ></select-component>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
         </template>
         <template slot="salesCompanySearch">
           <select-component
@@ -56,13 +59,13 @@
           {{ scope.row.createUserName }}
         </template>
         <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-view"
-            size="small"
-            @click.stop="beforeOpenPage(scope.row,scope.index)"
-          >查看
-          </el-button>
+<!--          <el-button-->
+<!--            type="text"-->
+<!--            icon="el-icon-view"-->
+<!--            size="small"-->
+<!--            @click.stop="beforeOpenPage(scope.row,scope.index)"-->
+<!--          >查看-->
+<!--          </el-button>-->
           <el-button
             type="text"
             icon="el-icon-edit"
@@ -355,6 +358,12 @@ export default {
     },
     goBack() {
       this.detailData=this.$options.data().detailData
+      if (this.$route.query) {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/businessManagement/receipt/index"
+        });
+      }
       this.isShow = true;
       this.$store.commit("DOM_OUT_DETAIL");
     },

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

@@ -114,6 +114,21 @@
         }
       ]
     },{
+      "label": "供应商",
+      "prop": "corpId",
+      "index": 4,
+      "width":100,
+      "cell": false,
+      "slot": true,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入供应商",
+          "trigger": "blur"
+        }
+      ]
+    },{
       "label": "订货数量",
       "prop": "orderQuantity",
       "index": 5,

+ 126 - 37
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -10,11 +10,11 @@
       <div class="add-customer-btn">
         <el-button
           class="el-button--small-yh"
-          type="primary"
+          type="warning"
           :disabled="detailData.seeDisabled"
           size="small"
           @click="applySettlement"
-        >申请结算</el-button>
+        >生成账单</el-button>
         <el-button
           class="el-button--small-yh"
           type="primary"
@@ -124,6 +124,15 @@
               @row-del="rowDel"
               @saveColumn="saveColumn('goods')"
           >
+            <template slot="corpId" slot-scope="{ row, index }">
+              <customer-dialog
+                v-if="row.$cellEdit"
+                v-model="row.corpName"
+                :cropIndex="index"
+                @getcorpId="getcorpId"
+              ></customer-dialog>
+              <span v-else>{{ row.corpName }}</span>
+            </template>
             <template slot="code" slot-scope="{row,index}">
               <el-button
                 type="text"
@@ -466,6 +475,24 @@
         </span>
     </el-dialog>
 
+    <el-dialog
+      title="账单"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applySettlementDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <apply-payment
+        :billType="billType"
+        :billData="billData"
+        @choceFun="choceFun"
+      >
+      </apply-payment>
+    </el-dialog>
   </div>
 </template>
 
@@ -501,6 +528,9 @@ import _ from "lodash";
 import option from "./configuration/mainList.json";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees"
+import customerDialog from "@/components/customer-dialog/main";
+//账单组件
+import ApplyPayment from "../../../components/finance/applyPayment";
 
 export default {
   name: "detailsPage",
@@ -509,11 +539,18 @@ export default {
       type: Object
     }
   },
+  components:{
+    customerDialog,
+    ApplyPayment
+  },
   data() {
     return {
       saveLoading: false,
       disabled: false,
       form: {},
+      billType:"销售",  //账单类型
+      billData:{},     //账单需要数据
+      applySettlementDialog:false,//生成账单组件
       configuration: {
         multipleChoices: false,
         multiple: false,
@@ -1070,7 +1107,8 @@ export default {
   //初始化查询
   async created() {
     this.rowHeight = (window.innerHeight - 130) + 'px'
-    this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
+    this.customerContact = customerContact
+    // this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(16), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
       this.paymentOption = res.data.data
@@ -1139,7 +1177,7 @@ export default {
         delete this.form.orderItemsList
         delete this.form.orderFeesList
         delete this.form.orderFilesList
-        delete this.form.corpName
+        // delete this.form.corpName
         delete this.form.belongToCorpList
         // 获取最大值
         let num = []
@@ -1202,6 +1240,9 @@ export default {
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    getcorpId(row) {
+      this.contactsData[row.index].corpId = row.id;
+    },
     // 采购金额获取
     getPurchasePrice(row) {
       getPurchasePrice({code: row.code}).then(res => {
@@ -1216,20 +1257,47 @@ export default {
     },
     // 生成采购单
     saveSell() {
-      if (!this.form.id) {
-        return this.$message.error("此单据没有提交记录,请先提交");
-      }
-      this.$confirm("是否生成采购单?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        saveSell(this.form.id).then(res => {
-          if (res.data.code == 200) {
-            this.$message.success("生成成功");
-          }
+      // if (!this.form.id) {
+      //   return this.$message.error("此单据没有提交记录,请先提交");
+      // }
+      if (contrastObj(this.form, this.oldForm) ||
+        contrastList(this.contactsData, this.oldGoodsList) ||
+        contrastList(this.advantageProjectData, this.oldFeesList) ||
+        contrastList(this.bankOfDepositData, this.oldUploadList)
+      ) {
+        this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.editCustomer(false)
+        }).catch(() => {
+          this.$message.info('已取消')
+          // this.$confirm("是否生成采购单?", {
+          //   confirmButtonText: "确定",
+          //   cancelButtonText: "取消",
+          //   type: "warning"
+          // }).then(() => {
+          //   saveSell(this.form.id).then(res => {
+          //     if (res.data.code == 200) {
+          //       this.$message.success("生成成功");
+          //     }
+          //   });
+          // });
+        })
+      } else {
+        this.$confirm("是否生成采购单?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          saveSell(this.form.id).then(res => {
+            if (res.data.code == 200) {
+              this.$message.success("生成成功");
+            }
+          });
         });
-      });
+      }
     },
     //点击行可编辑
     handleRowClick(row, event, column) {
@@ -1291,24 +1359,24 @@ export default {
         }).then(() => {
           this.editCustomer(false)
         }).catch(() => {
-          // this.$message({
-          //   type: 'info',
-          //   message: '已取消'
-          // });
-          this.selection.forEach(item => {
-            lsit.push(item.id)
-          })
-          let data = {
-            id: this.form.id,
-            orderItemIds: lsit
-          }
-          generateShipment(data).then(res => {
-            this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
-            this.$router.push({
-              path: "/businessManagement/deliveryNotice/index",
-              query: {form: JSON.stringify(res.data.data)},
-            });
-          })
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
+          // this.selection.forEach(item => {
+          //   lsit.push(item.id)
+          // })
+          // let data = {
+          //   id: this.form.id,
+          //   orderItemIds: lsit
+          // }
+          // generateShipment(data).then(res => {
+          //   this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
+          //   this.$router.push({
+          //     path: "/businessManagement/deliveryNotice/index",
+          //     query: {form: JSON.stringify(res.data.data)},
+          //   });
+          // })
         })
       } else {
         // lsit.push(this.selection[item].id)
@@ -1343,7 +1411,28 @@ export default {
           this.editCustomer(true)
         }).catch(() => {
         })
-      } else {}
+      } else {
+        this.beforeBillData(true)
+        this.applySettlementDialog = true;
+      }
+    },
+    //生成账单 拿到主表信息
+    beforeBillData(type){
+      this.billData = {
+        srcOrderno:this.form.orgOrderNo,
+        itemType:"销售",
+        corpsName:this.form.corpName,
+        corpId:this.form.corpId,
+      }
+      console.log(this.form)
+      console.log(this.billData )
+      if(type){ //申请货款
+        this.billData.srcId = -1
+      }
+    },
+    //关闭账单
+    choceFun(){
+      this.applySettlementDialog  = false
     },
     //商品选中触发
     productSelection(selection) {
@@ -1367,7 +1456,7 @@ export default {
     removeGoodsRepeat() {
       let obj = []
       this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.reduce((current,next) => {
-        obj[next.id] ? '': obj[next.id] = true && current.push(next)
+        obj[next.cname] ? '': obj[next.cname] = true && current.push(next)
         return current
       }, [])
     },

+ 1 - 1
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -20,7 +20,7 @@
         </el-button>
         <el-button
           class="el-button--small-yh"
-          type="primary"
+          type="primary"00000
           :disabled="disabled || receiptDisable"
           @click="editCustomer"
         >{{ form.id ? '确认修改' : '确认新增' }}

+ 7 - 4
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -27,7 +27,7 @@
                 <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"/>
                 <span v-else-if="item.type === 'select'">
                   <el-select v-model="form[item.prop]" slot="prepend" style="width: 100%;" size="small" placeholder="请选择">
-                    <el-option v-for="item in item.dicData" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="(item,index) in item.dicData" :label="item.label" :value="item.value" :key="index"></el-option>
                   </el-select>
                 </span>
                 <selectComponent v-else-if="item.prop === 'corps'" v-model="form[item.prop]"
@@ -207,6 +207,9 @@ import goodsOption from "./configuration/commodity.json";
 
 export default {
   name: "detailsPage",
+  props:{
+    detailData:Object
+  },
   data() {
     return {
       configuration: {
@@ -364,8 +367,8 @@ export default {
   },
   //初始化查询
   created() {
-    if (this.$route.query.id) {
-      detail(JSON.parse(this.$route.query.id)).then(res =>{
+    if (this.detailData.id) {
+      detail(this.detailData.id).then(res =>{
         this.form = res.data.data
         if (this.form.corpNameList) {
           this.configuration.dicData = this.form.corpNameList
@@ -384,7 +387,7 @@ export default {
   watch: {
     '$route'(to, from) {
       console.log(to, from);
-      if (this.$route.query.id) {
+      if (this.detailData.id) {
 
       } else {
         this.form = {}

+ 1 - 25
src/views/orderManagement/orderDetail/index.vue

@@ -115,7 +115,7 @@ export default {
             span: 6,
             slot: false
           },{
-            label: "下单人openid",
+            label: "下单人",
             prop: "corpId",
             rules: [
               {
@@ -435,24 +435,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.customer-head {
-  position: fixed;
-  top: 105px;
-  width: 100%;
-  margin-left: -10px;
-  height: 62px;
-  background: #ffffff;
-  box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
-  z-index: 999;
-}
-
-.customer-back {
-  cursor: pointer;
-  line-height: 62px;
-  font-size: 16px;
-  color: #323233;
-  font-weight: 400;
-}
 
 .back-icon {
   line-height: 64px;
@@ -465,12 +447,6 @@ export default {
   right: 140px;
   top: 115px;
 }
-
-.add-customer-btn {
-  position: fixed;
-  right: 36px;
-  top: 115px;
-}
 ::v-deep .el-form-item {
   margin-bottom: 8px;
 }

+ 16 - 12
src/views/purchase/contract/detailsPage.vue

@@ -5,25 +5,33 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-      </div>
       <div class="upper_right_button">
         <el-button type="primary"
-                   class="el-button--small-yh "
+                   class="el-button--small-yh"
+                   size="small"
                    :disabled="true"
                    @click.stop="">请核
         </el-button>
         <el-button type="warning"
+                   size="small"
                    class="el-button--small-yh "
                    @click.stop="applyPayment()">申请货款
         </el-button>
-<!--        <el-button type="success"
-                   class="el-button&#45;&#45;small-yh "
+        <el-button type="info"
+                   size="small"
+                   @click="applicationDialog = true,applicationData = contactsData"
+        >查看申请记录
+        </el-button>
+        <el-button type="success"
+                   size="small"
+                   class="el-button--small-yh "
                    :disabled="true"
                    @click.stop="">复制新单
-        </el-button>-->
+        </el-button>
         <el-button
           class="el-button--small-yh "
           type="primary"
+          size="small"
           :disabled="disabled"
           @click="editCustomer"
           :loading="editCustomerLoading"
@@ -31,6 +39,7 @@
         </el-button>
       </div>
     </div>
+    </div>
     <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px">
         <containerTitle title="基础信息"></containerTitle>
@@ -189,11 +198,6 @@
                          @click="beforePage(false)"
               >生成收货单
               </el-button>
-              <el-button type="info"
-                         size="small"
-                         @click="applicationDialog = true,applicationData = contactsData"
-              >查看申请记录
-              </el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -1169,8 +1173,8 @@ export default {
 .upper_right_button{
   display: flex;
   position: fixed;
-  right: 20px;
-  top: 43px;
+  right: 12px;
+  top: 47px;
 }
 .required_fields{
   color: #F56C6C;

+ 1 - 1
src/views/workManagement/main-items/configuration/mainList.json

@@ -8,7 +8,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 18,
+  "searchMenuSpan": 12,
   "tree": true,
   "selection": false,
   "editBtn": false,

+ 26 - 22
src/views/workManagement/main-items/detailsPage.vue

@@ -1,22 +1,27 @@
 <template>
   <div class="borderless">
-    <div class="main-head">
-      <div class="main-back">
+    <div class="customer-head">
+      <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-        <el-button type="success"
-                   class="el-button--small-yh add-customer-btn-two"
-                   :disabled="true"
-                   @click.stop="addMainProject">复制新单
-        </el-button>
-        <el-button class="el-button--small-yh add-customer-btn" type="primary"
-                   @click.stop="editMainProject"
-        >{{this.id?"确认修改" :"确认新增"}}
-        </el-button>
+        <div class="upper_right_button">
+          <el-button type="success"
+                     size="small"
+                     class="el-button--small-yh "
+                     :disabled="true"
+                     @click.stop="addMainProject">复制新单
+          </el-button>
+          <el-button class="el-button--small-yh "
+                     type="primary"
+                     @click.stop="editMainProject"
+                     size="small"
+          >{{this.id?"确认修改" :"确认新增"}}
+          </el-button>
+        </div>
       </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
         <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
@@ -1063,6 +1068,12 @@
     box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
     z-index: 999;
   }
+  .upper_right_button{
+    display: flex;
+    position: fixed;
+    right: 12px;
+    top: 47px;
+  }
   .main-back {
     cursor: pointer;
     line-height: 62px;
@@ -1074,17 +1085,10 @@
     overflow: hidden;
     max-height: 660px;
   }
-  .add-customer-btn-two {
-    position: fixed;
-    right: 150px;
-    top: 115px;
-  }
-  .add-customer-btn {
-    position: fixed;
-    right: 36px;
-    top: 115px;
-  }
   ::v-deep .el-form-item {
     margin-bottom: 0;
   }
+  ::v-deep .el-form-item__content{
+    line-height: 32px;
+  }
 </style>

+ 10 - 5
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -1,11 +1,13 @@
 <template>
   <div class="borderless">
-    <div class="receipt-head">
-      <div class="receipt-back">
+    <div class="customer-head">
+      <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-        <el-button class="el-button--small-yh add-customer-btn" type="primary"
+        <el-button class="el-button--small-yh add-customer-btn"
+                   size="small"
+                   type="primary"
                    @click.stop="editMainProject"
         >{{this.id?"确认修改" :"确认新增"}}
         </el-button>
@@ -525,11 +527,14 @@
   }
   .add-customer-btn {
     position: fixed;
-    right: 36px;
-    top: 115px;
+    right: 12px;
+    top: 47px;
   }
   .landConFrom-input{
     display:flex;
     justify-content:center;
   }
+  ::v-deep .el-form-item__content{
+    line-height: 32px;
+  }
 </style>

+ 1 - 1
src/views/workManagement/task/configuration/mainList.json

@@ -7,7 +7,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 6,
   "tree": true,
   "selection": false,
   "addBtn": false,