소스 검색

Merge remote-tracking branch 'origin/dev' into dev

qinbai 3 년 전
부모
커밋
4c74c89347

+ 17 - 2
src/components/goodsSelect/index.vue

@@ -64,6 +64,7 @@
                      @refresh-change="refreshChange"
                      @selection-change="selectionChange"
                      @on-load="onLoad"
+                     @saveColumn="saveColumn"
                      @tree-load="treeLoad">
           </avue-crud>
         </basic-container>
@@ -100,7 +101,7 @@ export default {
       dicData: [],
       dialogVisible: false,
       value: '',
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       selection: [],
@@ -141,7 +142,9 @@ export default {
       },
     }
   },
-  created() {
+  async created() {
+    this.option = option
+    // this.option = await this.getColumnData(this.getColumnName(49), option);
     // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
     this.remoteMethod()
   },
@@ -291,6 +294,18 @@ export default {
         return current
       }, [])
     },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(49),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 };
 </script>

+ 17 - 15
src/components/part-dialog/main.vue

@@ -37,7 +37,7 @@
               size="small"
               type="text"
               style="padding:4px 10px;float:left"
-              @click="rePick(row.index)"
+              @click="rePick(row,index)"
               >选择</el-button
             >
             <span> {{ row.goodName }}</span>
@@ -91,7 +91,7 @@ export default {
       partVisible: false,
       selectionList: [],
       goodsIndex: null,
-      amoutSum:0
+      amoutSum: 0
     };
   },
   props: {
@@ -104,11 +104,16 @@ export default {
   },
   created() {},
   methods: {
-    rePick(row,index){
-            this.$message({
-        type: "warning",
-        message: "正在开发中!"
-      });
+    rePick(row, index) {
+      console.log()
+      this.$emit('partReData',{
+        ...row,
+        index: index
+      })
+      // this.$message({
+      //   type: "warning",
+      //   message: "正在开发中!"
+      // });
     },
     priceChange(row) {
       row.amout = _.multiply(
@@ -132,7 +137,7 @@ export default {
       this.partVisible = true;
     },
     closed() {
-      this.amoutSum=0
+      this.amoutSum = 0;
       this.$refs.crud.toggleSelection();
       this.$emit("partClosed");
     },
@@ -140,7 +145,7 @@ export default {
       this.selectionList = list;
     },
     importPart() {
-      this.$emit("importPart", this.data,this.amoutSum, this.goodsIndex);
+      this.$emit("importPart", this.data, this.amoutSum, this.goodsIndex);
       this.partVisible = false;
     },
     sizeChange(val) {
@@ -162,17 +167,14 @@ export default {
       if (columns.length > 0) {
         columns.forEach((item, index) => {
           sums[0] = "合计";
-          if (
-            item.property == "goodNumber" ||
-            item.property == "amout"
-          ) {
+          if (item.property == "goodNumber" || item.property == "amout") {
             let qtySum = 0;
             let amountSum = 0;
-            this.amoutSum=0
+            this.amoutSum = 0;
             data.forEach(e => {
               qtySum = _.add(qtySum, Number(e.goodNumber));
               amountSum = _.add(amountSum, Number(e.amout));
-              this.amoutSum=amountSum
+              this.amoutSum = amountSum;
             });
             //数量总计
             if (item.property == "goodNumber") {

+ 26 - 8
src/components/procurement/config/market.json

@@ -42,39 +42,57 @@
       "width":180
     },
     {
+      "label": "商品名称",
+      "prop": "cname",
+      "index": 4,
+      "width":120
+    },
+    {
+      "label": "编码",
+      "prop": "code",
+      "index": 5,
+      "width":120
+    },
+    {
+      "label": "规格型号",
+      "prop": "typeno",
+      "index": 6,
+      "width":120
+    },
+    {
       "label": "货物品种",
       "prop": "priceCategoryNames",
-      "index": 4,
+      "index": 7,
       "width":120
     },{
       "label": "规格名称",
       "prop": "itemType",
-      "index": 5,
+      "index": 8,
       "width":120
     },{
       "label": "件数",
       "prop": "purchaseQuantity",
-      "index": 6,
+      "index": 9,
       "width":120
     },{
       "label": "发票净重(吨)",
       "prop": "invoiceWeight",
-      "index": 7,
+      "index": 10,
       "width":120
     },{
       "label": "码单重量(吨)",
       "prop": "billWeight",
-      "index": 8,
+      "index": 11,
       "width":120
     },{
       "label": "单价",
       "prop": "price",
-      "index": 9,
+      "index": 12,
       "width":120
     },{
       "label": "合同金额",
       "prop": "amount",
-      "index": 10,
+      "index": 13,
       "width":120
     },{
       "label": "订单日期",
@@ -86,7 +104,7 @@
       "unlinkPanels": true,
       "searchRange": true,
       "search": true,
-      "index": 6,
+      "index": 14,
       "width":150
     }
   ]

+ 17 - 2
src/components/selectComponent/customerSelect.vue

@@ -63,6 +63,7 @@
                      @refresh-change="refreshChange"
                      @selection-change="selectionChange"
                      @on-load="onLoad"
+                     @saveColumn="saveColumn"
                      @tree-load="treeLoad">
           </avue-crud>
         </basic-container>
@@ -99,7 +100,7 @@ export default {
       dicData: [],
       dialogVisible: false,
       value: '',
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       selection: [],
@@ -140,7 +141,9 @@ export default {
       },
     }
   },
-  created() {
+  async created() {
+    this.option = option
+    // this.option = await this.getColumnData(this.getColumnName(47), option);
     // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
     this.remoteMethod()
   },
@@ -279,6 +282,18 @@ export default {
         return current
       }, [])
     },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(47),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 };
 </script>

+ 17 - 2
src/components/warehouseSelect/index.vue

@@ -53,6 +53,7 @@
                      @refresh-change="refreshChange"
                      @selection-change="selectionChange"
                      @on-load="onLoad"
+                     @saveColumn="saveColumn"
                      @tree-load="treeLoad">
           </avue-crud>
         </basic-container>
@@ -89,7 +90,7 @@ export default {
       dicData: [],
       dialogVisible: false,
       value: '',
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       selection: [],
@@ -130,7 +131,9 @@ export default {
       },
     }
   },
-  created() {
+  async created() {
+    this.option = option
+    // this.option = await this.getColumnData(this.getColumnName(48), option);
     // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
     this.remoteMethod()
   },
@@ -269,6 +272,18 @@ export default {
         return current
       }, [])
     },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(48),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 };
 </script>

+ 24 - 14
src/enums/column-name.js

@@ -106,41 +106,51 @@ const columnName = [{
 }, {
   code: 35,
   name: '封装上传附件'
-},{
+}, {
   code: 36,
   name: '进口采购订单'
-},{
+}, {
   code: 37,
   name: '进口采购明细'
-},{
+}, {
   code: 38,
   name: '进口销售订单'
-},{
+}, {
   code: 39,
   name: '进口销售明细'
-},{
+}, {
   code: 40,
   name: '进口收货单'
-},{
+}, {
   code: 41,
   name: '进口收货明细'
-},{
+}, {
   code: 42,
   name: '进口收货导入采购明细'
-},{
+}, {
   code: 43,
   name: '进口发货单'
-},{
+}, {
   code: 44,
   name: '进口发货明细'
-},{
+}, {
   code: 45,
   name: '进口发货导入销售明细'
 },
-{
-  code: 46,
-  name: '申请费用列表'
-}
+  {
+    code: 46,
+    name: '申请费用列表'
+  }, {
+    code: 47,
+    name: '导入客户'
+  },{
+    code: 48,
+    name: '导入仓库'
+  },
+  {
+    code: 49,
+    name: '导入商品'
+  },
 
 
 ]

+ 4 - 4
src/router/views/index.js

@@ -185,18 +185,18 @@ export default [{
     },
     //销售政策详情页
     {
-        path: '/salesPolicy_detailsPageEdit',
+        path: '/maintenance/salesPolicy/index',
         component: Layout,
         hidden: true,
         children: [
             {
-                path: '/salesPolicy_detailsPageEdit',
+                path: '/maintenance/salesPolicy/index',
                 name: '销售政策',
                 meta: {
-                    i18n: 'salesPolicy_detailsPageEdit',
+                    i18n: 'maintenance/salesPolicy/index',
                     keepAlive: true,
                 },
-                component: () => import( /* webpackChunkName: "views" */ '@/views/maintenance/salesPolicy/detailsPageEdit')
+                component: () => import( /* webpackChunkName: "views" */ '@/views/maintenance/salesPolicy/index')
             }
         ]
     },

+ 1 - 0
src/util/contrastData.js

@@ -24,6 +24,7 @@ export function contrastList(newlist, oldlist) {
         if (!reg.test(oldlist[i])) {
           delete oldlist[i].olditem
         }
+        console.log(newitem==Object,newitem==Array)
         if (newitem == olditem) {
           if (newlist[i][newitem] != oldlist[i][olditem]) {
             return true

+ 29 - 5
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="borderless">
+  <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
@@ -269,8 +269,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeGoods">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -310,8 +310,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeFees">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -690,10 +690,23 @@ export default {
       oldUploadList: [],
       // 导入销售订单明细
       marketDialog: false,
+      // 弹窗高度
+      rowHeight: '',
+      // 查询时loading页面
+      pageLoading: false,
     }
   },
+  mounted() {
+    this.$nextTick(() => {
+      // 监听浏览器高度变化,改变表格高度
+      window.onresize = () => {
+        this.rowHeight = (window.innerHeight - 130) + 'px'
+      }
+    })
+  },
   //初始化查询
   async created() {
+    this.rowHeight = (window.innerHeight - 130) + 'px'
     this.customerContact = await this.getColumnData(this.getColumnName(21), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(22), advantageProject);
     this.getWorkDicts("order_status").then(res => {
@@ -1243,6 +1256,8 @@ export default {
             } else {
               this.queryData(res.data.data.id)
             }
+          }).catch(() => {
+            this.saveLoading = false
           })
         } else {
           return false;
@@ -1326,6 +1341,15 @@ export default {
     // 导入销售明细
     importMarket(list) {
       console.log(list)
+      list.forEach(item => {
+        item.cname = item.priceCategoryNames
+        delete item.id
+        delete item.createTime
+        delete item.createUser
+        delete item.pid
+        this.$refs.crudContact.rowCellAdd(item);
+      })
+      this.marketDialog = false;
     },
     // 关闭销售弹窗
     closeMarkeDialog() {

+ 18 - 7
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="borderless">
+  <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
@@ -264,8 +264,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeGoods">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -305,8 +305,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeFees">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -586,10 +586,23 @@ export default {
       oldGoodsList: [],
       oldFeesList: [],
       oldUploadList: [],
+      // 弹窗高度
+      rowHeight: '',
+      // 查询时loading页面
+      pageLoading: false,
     }
   },
+  mounted() {
+    this.$nextTick(() => {
+      // 监听浏览器高度变化,改变表格高度
+      window.onresize = () => {
+        this.rowHeight = (window.innerHeight - 130) + 'px'
+      }
+    })
+  },
   //初始化查询
   async created() {
+    this.rowHeight = (window.innerHeight - 130) + 'px'
     // this.customerContact = customerContact
     this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(19), advantageProject);
@@ -823,7 +836,6 @@ export default {
     },
     //费用编辑导入触发
     choiceCost() {
-      console.log('1111')
       if (this.tableDataCost.length === 1) {
         this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
         this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
@@ -834,7 +846,6 @@ export default {
     },
     //费用导入触发
     importCost() {
-      console.log('111111')
       // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
       if (this.tableDataCost.length > 0) {
         for (let item in this.tableDataCost) {

+ 18 - 5
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="borderless">
+  <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
@@ -262,8 +262,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeGoods">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -303,8 +303,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeFees">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -662,10 +662,23 @@ export default {
       oldGoodsList: [],
       oldFeesList: [],
       oldUploadList: [],
+      // 弹窗高度
+      rowHeight: '',
+      // 查询时loading页面
+      pageLoading: false,
     }
   },
+  mounted() {
+    this.$nextTick(() => {
+      // 监听浏览器高度变化,改变表格高度
+      window.onresize = () => {
+        this.rowHeight = (window.innerHeight - 130) + 'px'
+      }
+    })
+  },
   //初始化查询
   async created() {
+    this.rowHeight = (window.innerHeight - 130) + 'px'
     this.customerContact = await this.getColumnData(this.getColumnName(24), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(25), advantageProject);
     this.getWorkDicts("procurement_method").then(res => {

+ 35 - 12
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="borderless">
+  <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
@@ -333,8 +333,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeGoods">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -375,8 +375,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closePolicy">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -424,8 +424,8 @@
         :destroy-on-close="true"
         :close-on-press-escape="false"
         @close="closeFees">
-      <el-row style="height: 0;">
-        <el-col :span="5">
+      <el-row :style="{height: rowHeight}">
+        <el-col :span="5" style="height: 100%;overflow-y: auto">
           <div>
             <el-scrollbar>
               <basic-container>
@@ -1045,10 +1045,23 @@ export default {
       purchasePriceOption: [],
       // 销售价格
       salesPriceOtion: [],
+      // 弹窗高度
+      rowHeight: '',
+      // 查询时loading页面
+      pageLoading: false,
     }
   },
+  mounted() {
+    this.$nextTick(() => {
+      // 监听浏览器高度变化,改变表格高度
+      window.onresize = () => {
+        this.rowHeight = (window.innerHeight - 130) + 'px'
+      }
+    })
+  },
   //初始化查询
   async created() {
+    this.rowHeight = (window.innerHeight - 130) + 'px'
     this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
     this.advantageProject = await this.getColumnData(this.getColumnName(16), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
@@ -1083,6 +1096,7 @@ export default {
       row.itemId = event.id
     },
     queryData(id, isCopy = false){
+      this.pageLoading = true
       detail(id).then(res => {
         this.form = res.data.data;
         this.contactsData = this.form.orderItemsList
@@ -1135,11 +1149,6 @@ export default {
           goodsNum.push(item.sort)
           purchaseAmount += Number(item.purchaseAmount)
         })
-        // if (Number(this.form.grossProfit) != 0) {
-        //   this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed(2)
-        // } else {
-        //   this.form.grossProfitRate = '0.00'
-        // }
         if (goodsNum.length == 0) {
           this.maxGoodsNum = 0;
         } else {
@@ -1176,6 +1185,7 @@ export default {
         }
       }).finally(() => {
         this.saveLoading = false
+        this.pageLoading = false
       });
     },
     // 复制新单
@@ -1978,4 +1988,17 @@ export default {
 ::v-deep .el-form-item__content{
   line-height: 32px;
 }
+///deep/ .avue-tree {
+//  display: flex;
+//  flex-direction: column;
+//  overflow-y: hidden;
+//  height: 100%;
+//}
+///deep/ .avue-tree__filter {
+//  flex-shrink: 1;
+//}
+///deep/ .avue-tree__content {
+//  height: calc(100% - 32px);
+//  overflow-y: auto;
+//}
 </style>

+ 2 - 2
src/views/businessManagement/salesOrder/index.vue

@@ -118,8 +118,8 @@ export default {
   },
   async created() {
     this.search.businesDate = defaultDate(1)
-    this.option = option
-    // this.option = await this.getColumnData(this.getColumnName(14), option);
+    // this.option = option
+    this.option = await this.getColumnData(this.getColumnName(14), option);
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++

+ 54 - 25
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -364,6 +364,7 @@
       :partList="partList"
       @importPart="importPart"
       @partClosed="partClosed"
+      @partReData="partReData"
     />
   </div>
 </template>
@@ -689,7 +690,7 @@ export default {
       subLoading: false,
       pageLoading: false,
       showBut: true,
-      partreData: {},
+      partreData: null,
       partType: false,
       partList: []
     };
@@ -745,6 +746,10 @@ export default {
     }
   },
   methods: {
+    partReData(row) {
+      this.partreData = row;
+      this.partOpen();
+    },
     saveSell() {
       if (!this.form.id) {
         return this.$message.error("此单据没有提交记录,请先提交");
@@ -780,9 +785,11 @@ export default {
     importPart(rows, sum, index) {
       this.data[index].partsList = rows;
       this.data[index].partsPrice = sum;
+      this.priceChange(this.data[index]);
     },
     partClosed() {
       this.partList = [];
+      this.partreData=null;
     },
     getcorpId(row) {
       this.data[row.index].corpId = row.id;
@@ -804,18 +811,21 @@ export default {
     priceChange(row) {
       const sum = _.multiply(
         _.add(
-          Number(
-            _.multiply(
-              row.price ? row.price : 0,
-              row.orderQuantity ? row.orderQuantity : 0
+          _.add(
+            Number(
+              _.multiply(
+                row.price ? row.price : 0,
+                row.orderQuantity ? row.orderQuantity : 0
+              )
+            ),
+            Number(
+              _.add(
+                Number(row.insurance ? row.insurance : 0),
+                Number(row.freight ? row.freight : 0)
+              )
             )
           ),
-          Number(
-            _.add(
-              Number(row.insurance ? row.insurance : 0),
-              Number(row.freight ? row.freight : 0)
-            )
-          )
+          Number(row.partsPrice ? row.partsPrice : 0)
         ),
         _.divide(row.discount ? row.discount : 10, 10)
       );
@@ -931,18 +941,39 @@ export default {
     },
     importGoods() {
       if (this.partType) {
-        this.selectionList.forEach(e => {
-          this.partList.push({
-            goodId: e.id,
-            goodTypeId: e.goodsTypeId,
-            goodTypeName: e.goodsTypeName,
-            goodName: e.cname,
-            price: e.price,
-            goodNumber: 0,
-            amout: 0,
-            $cellEdit: true
+        if (this.partreData) {
+          if (this.selectionList.length != 1) {
+            return this.$message.error("重新选择的时候只能选择一条数据");
+          } else {
+            this.selectionList.forEach(e => {
+              this.partList.forEach((item, index) => {
+                if (index == this.partreData.index) {
+                  item.goodId = e.id;
+                  item.goodTypeId = e.goodsTypeId;
+                  item.goodTypeName = e.goodsTypeName;
+                  item.goodName = e.cname;
+                  item.price = this.partreData.goodNumber;
+                  item.goodNumber = this.partreData.goodNumber;
+                  item.amout = this.partreData.amout;
+                  item.$cellEdit = true;
+                }
+              });
+            });
+          }
+        } else {
+          this.selectionList.forEach(e => {
+            this.partList.push({
+              goodId: e.id,
+              goodTypeId: e.goodsTypeId,
+              goodTypeName: e.goodsTypeName,
+              goodName: e.cname,
+              price: e.price,
+              goodNumber: 0,
+              amout: 0,
+              $cellEdit: true
+            });
           });
-        });
+        }
       } else if (this.reData) {
         if (this.selectionList.length != 1) {
           return this.$message.error("重新选择的时候只能选择一条数据");
@@ -1122,9 +1153,7 @@ export default {
     //返回列表
     backToList() {
       let orderFeesList = this.$refs.feeInfo.submitData();
-      console.log(
-      this.data, this.olddata
-      );
+      console.log(this.data, this.olddata);
       if (
         contrastObj(this.form, this.oldform) ||
         contrastList(this.data, this.olddata) ||

+ 27 - 13
src/views/exportTrade/salesContract/config/customerContact.json

@@ -70,23 +70,37 @@
       "overHidden": true
     },
     {
+      "label": "配件信息",
+      "prop": "partsList",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "配件价格",
+      "prop": "partsPrice",
+      "index": 9,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "供应商",
       "prop": "corpId",
-      "index": 8,
+      "index": 10,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "重点推荐",
       "prop": "priorityReferrer",
-      "index": 9,
+      "index": 11,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "推荐理由",
       "prop": "referrerReason",
-      "index": 10,
+      "index": 12,
       "width": 100,
       "overHidden": true,
       "cell": true
@@ -94,14 +108,14 @@
     {
       "label": "销售价",
       "prop": "price",
-      "index": 11,
+      "index": 13,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "计价单位",
       "prop": "unit",
-      "index": 12,
+      "index": 14,
       "width": 100,
       "overHidden": true,
       "cell": true,
@@ -115,56 +129,56 @@
     {
       "label": "数量",
       "prop": "orderQuantity",
-      "index": 13,
+      "index": 15,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "发货数量",
       "prop": "actualQuantity",
-      "index": 14,
+      "index": 16,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "保险",
       "prop": "insurance",
-      "index": 15,
+      "index": 17,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "运费",
       "prop": "freight",
-      "index": 16,
+      "index": 18,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "折扣",
       "prop": "discount",
-      "index": 17,
+      "index": 19,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 18,
+      "index": 20,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "税率",
       "prop": "taxRate",
-      "index": 19,
+      "index": 21,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 20,
+      "index": 22,
       "width": 100,
       "overHidden": true,
       "cell": true

+ 97 - 15
src/views/exportTrade/salesContract/detailsPage.vue

@@ -133,6 +133,15 @@
               >
               <span> {{ row.cname }}</span>
             </template>
+            <template slot="partsList" slot-scope="{ row, index }">
+              <el-button
+                size="small"
+                type="text"
+                @click="partrePick(row, index)"
+                :disabled="disabled"
+                >操作</el-button
+              >
+            </template>
             <template slot="itemType" slot-scope="{ row }">
               <el-select
                 v-if="row.$cellEdit"
@@ -378,6 +387,14 @@
       reportName="客户询价"
       @onClose="onClose()"
     ></report-dialog>
+    <part-dialog
+      ref="part"
+      @partOpen="partOpen()"
+      :partList="partList"
+      @importPart="importPart"
+      @partClosed="partClosed"
+      @partReData="partReData"
+    />
   </div>
 </template>
 
@@ -399,6 +416,7 @@ import {
 } from "@/api/basicData/salesContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
+import partDialog from "@/components/part-dialog/main";
 import { micrometerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import customerDialog from "@/components/customer-dialog/main";
@@ -746,8 +764,11 @@ export default {
       oldorderFeesList: [],
       oldorderFilesList: [],
       subLoading: false,
-       pageLoading: false,
-      showBut: true
+      pageLoading: false,
+      showBut: true,
+      partreData: null,
+      partType: false,
+      partList: []
     };
   },
   props: {
@@ -759,7 +780,8 @@ export default {
     reportDialog,
     feeInfo,
     uploadFile,
-    customerDialog
+    customerDialog,
+    partDialog
   },
   async created() {
     this.tableOption = await this.getColumnData(
@@ -812,6 +834,27 @@ export default {
     });
   },
   methods: {
+    partReData(row) {
+      this.partreData = row;
+      this.partOpen();
+    },
+    partOpen() {
+      this.partType = true;
+      this.newDetails();
+    },
+    partrePick(row, index) {
+      this.partList = row.partsList;
+      this.$refs.part.init(row.partsList, index);
+    },
+    importPart(rows, sum, index) {
+      this.data[index].partsList = rows;
+      this.data[index].partsPrice = sum;
+      this.priceChange(this.data[index]);
+    },
+    partClosed() {
+      this.partList = [];
+      this.partreData = null;
+    },
     saveSell() {
       if (!this.form.id) {
         return this.$message.error("此单据没有提交记录,请先提交");
@@ -855,18 +898,21 @@ export default {
     priceChange(row) {
       const sum = _.multiply(
         _.add(
-          Number(
-            _.multiply(
-              row.price ? row.price : 0,
-              row.orderQuantity ? row.orderQuantity : 0
+          _.add(
+            Number(
+              _.multiply(
+                row.price ? row.price : 0,
+                row.orderQuantity ? row.orderQuantity : 0
+              )
+            ),
+            Number(
+              _.add(
+                Number(row.insurance ? row.insurance : 0),
+                Number(row.freight ? row.freight : 0)
+              )
             )
           ),
-          Number(
-            _.add(
-              Number(row.insurance ? row.insurance : 0),
-              Number(row.freight ? row.freight : 0)
-            )
-          )
+          Number(row.partsPrice ? row.partsPrice : 0)
         ),
         _.divide(row.discount ? row.discount : 10, 10)
       );
@@ -949,8 +995,41 @@ export default {
       });
     },
     importGoods() {
-      if (this.reData) {
-        console.log(this.reData);
+      if (this.partType) {
+        if (this.partreData) {
+          if (this.selectionList.length != 1) {
+            return this.$message.error("重新选择的时候只能选择一条数据");
+          } else {
+            this.selectionList.forEach(e => {
+              this.partList.forEach((item, index) => {
+                if (index == this.partreData.index) {
+                  item.goodId = e.id;
+                  item.goodTypeId = e.goodsTypeId;
+                  item.goodTypeName = e.goodsTypeName;
+                  item.goodName = e.cname;
+                  item.price = this.partreData.goodNumber;
+                  item.goodNumber = this.partreData.goodNumber;
+                  item.amout = this.partreData.amout;
+                  item.$cellEdit = true;
+                }
+              });
+            });
+          }
+        } else {
+          this.selectionList.forEach(e => {
+            this.partList.push({
+              goodId: e.id,
+              goodTypeId: e.goodsTypeId,
+              goodTypeName: e.goodsTypeName,
+              goodName: e.cname,
+              price: e.price,
+              goodNumber: 0,
+              amout: 0,
+              $cellEdit: true
+            });
+          });
+        }
+      } else if (this.reData) {
         if (this.selectionList.length != 1) {
           return this.$message.error("重新选择的时候只能选择一条数据");
         } else {
@@ -1011,6 +1090,9 @@ export default {
       this.selectionList = [];
       this.treeDeptId = "";
       this.reData = null;
+      if (this.partType) {
+        this.partType = false;
+      }
     },
     goodsSelectionChange(list) {
       this.orderItemIds = [];

+ 6 - 5
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -647,11 +647,12 @@ export default {
     },
     //返回列表
     backToList() {
-      this.$router.$avueRouter.closeTag();
-      this.$router.push({
-        path: '/maintenance/salesPolicy/index',
-        query: {}
-      });
+      this.$emit("goBack");
+      // this.$router.$avueRouter.closeTag();
+      // this.$router.push({
+      //   path: '/maintenance/salesPolicy/index',
+      //   query: {}
+      // });
     },
     async saveGoodsColumn() {
       // const inSave = await this.saveColumnData(

+ 90 - 60
src/views/maintenance/salesPolicy/index.vue

@@ -1,69 +1,82 @@
 <template>
-  <basic-container>
-    <avue-crud :option="option"
-               :data="dataList"
-               ref="crud"
-               v-model="form"
-               :page.sync="page"
-               :search.sync="search"
-               @row-del="rowDel"
-               @row-update="rowUpdate"
-               :before-open="beforeOpen"
-               :before-close="beforeClose"
-               @row-save="rowSave"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad"
-               @tree-load="treeLoad">
-      <template slot-scope="{}" slot="startTimeSearchLabel">
-        <span>有效日期:</span>
-      </template>
-      <template slot="corpsSearch">
-        <select-component
-          v-model="search.corps"
-          :configuration="configuration"
-        ></select-component>
-      </template>
-      <template slot-scope="scope" slot="corps">
-        {{ scope.row.corps }}
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button
+  <div>
+    <basic-container v-if="isShow">
+      <avue-crud :option="option"
+                 :data="dataList"
+                 ref="crud"
+                 v-model="form"
+                 :page.sync="page"
+                 :search.sync="search"
+                 @row-del="rowDel"
+                 @row-update="rowUpdate"
+                 :before-open="beforeOpen"
+                 :before-close="beforeClose"
+                 @row-save="rowSave"
+                 @search-change="searchChange"
+                 @search-reset="searchReset"
+                 @selection-change="selectionChange"
+                 @current-change="currentChange"
+                 @size-change="sizeChange"
+                 @refresh-change="refreshChange"
+                 @on-load="onLoad"
+                 @tree-load="treeLoad">
+        <template slot-scope="{}" slot="startTimeSearchLabel">
+          <span>有效日期:</span>
+        </template>
+        <template slot="corpsSearch">
+          <select-component
+            v-model="search.corps"
+            :configuration="configuration"
+          ></select-component>
+        </template>
+        <template slot-scope="scope" slot="corps">
+          {{ scope.row.corps }}
+        </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
+          >查看
+          </el-button>
+          <el-button
             type="text"
             icon="el-icon-edit"
             size="small"
             @click.stop="editOpen(scope.row,scope.index)"
-        >编辑
-        </el-button>
-        <el-button
+          >编辑
+          </el-button>
+          <el-button
             type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
-        >删除
-        </el-button>
-      </template>
-    </avue-crud>
-  </basic-container>
+          >删除
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+
+    <detail-page
+      ref="detail"
+      @goBack="goBack"
+      :detailData="detailData"
+      v-else
+    ></detail-page>
+  </div>
 </template>
 
 <script>
 import option from "./configuration/mainList.json";
-import {customerList, typeSave, deleteDetails} from "@/api/maintenance/salesPolicy"
+import {customerList, typeSave, deleteDetails} from "@/api/maintenance/salesPolicy";
+import detailPage from "./detailsPageEdit";
 
 export default {
   name: "customerInformation",
+  components: {
+    detailPage
+  },
   data() {
     return {
       form: {},
@@ -83,7 +96,9 @@ export default {
         pageSize: 10,
         pagerCount: 5,
         total: 0,
-      }
+      },
+      isShow: true,
+      detailData: {},
     }
   },
   created() {
@@ -154,24 +169,35 @@ export default {
     },
     //查看跳转页面
     beforeOpenPage(row, index) {
-      this.$router.push({
-        path: "/salesPolicy_detailsPageEdit",
-        query: {id: JSON.stringify(row.id)},
-      });
+      this.detailData = {
+        id: row.id,
+      };
+      this.isShow = false;
+      // this.$router.push({
+      //   path: "/salesPolicy_detailsPageEdit",
+      //   query: {id: JSON.stringify(row.id)},
+      // });
     },
     //新增跳转页面
     beforeOpen(row, index) {
-      console.log(row)
-      this.$router.push({
-        path: "/salesPolicy_detailsPageEdit",
-        query: {id: JSON.stringify(row.id)},
-      });
+      this.detailData = {
+        id: row.id,
+      };
+      this.isShow = false;
+      // this.$router.push({
+      //   path: "/salesPolicy_detailsPageEdit",
+      //   query: {id: JSON.stringify(row.id)},
+      // });
     },
     editOpen(row, index) {
-      this.$router.push({
-        path: "/salesPolicy_detailsPageEdit",
-        query: {id: JSON.stringify(row.id)},
-      });
+      this.detailData = {
+        id: row.id,
+      };
+      this.isShow = false;
+      // this.$router.push({
+      //   path: "/salesPolicy_detailsPageEdit",
+      //   query: {id: JSON.stringify(row.id)},
+      // });
     },
     //点击新增时触发
     beforeClose(done) {
@@ -229,6 +255,10 @@ export default {
         resolve(res.data.data.records);
       });
     },
+    goBack() {
+      this.detailData=this.$options.data().detailData
+      this.isShow = true;
+    },
   }
 }
 </script>

+ 2 - 0
src/views/mallManagement/commodity/productList/configuration/commodity.json

@@ -11,6 +11,8 @@
   "selection": true,
   "viewBtn": true,
   "dialogClickModal": false,
+  "calcHeight": "auto",
+  "height": "auto",
   "column": [
     {
       "label": "商品编码",

+ 1 - 1
src/views/mallManagement/commodity/productList/detailsPageEdit.vue

@@ -134,7 +134,7 @@
         top="10vh"
     >
       <span>
-        <el-row>
+        <el-row style="height: 0">
           <el-col :span="5">
             <div>
               <el-scrollbar>