Browse Source

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

QuKatie 3 years ago
parent
commit
2b5b29ce0d
27 changed files with 399 additions and 128 deletions
  1. 1 1
      src/api/landTransportation/index.js
  2. 4 2
      src/components/crop-select/main.vue
  3. 36 13
      src/views/basicData/customerInformation/detailsPageEdit.vue
  4. 20 12
      src/views/basicData/customerManagement/companyMaterial/detailsPageEdit.vue
  5. 20 12
      src/views/basicData/customerManagement/supplierMaterial/detailsPageEdit.vue
  6. 20 12
      src/views/basicData/factoryInformation/factoryInformation/detailsPageEdit.vue
  7. 20 12
      src/views/basicData/fleetInformation/detailsPageEdit.vue
  8. 17 1
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  9. 16 16
      src/views/landTransportation/dispatchingCars/detailPage.vue
  10. 20 18
      src/views/landTransportation/placeAnOrder/detailPage.vue
  11. 25 2
      src/views/landTransportation/reportAnalysis/index.vue
  12. 9 0
      src/views/maintenance/salesPolicy/detailsPageEdit.vue
  13. 10 0
      src/views/reimbursement/config/customerContact.json
  14. 19 0
      src/views/reimbursement/detail.vue
  15. 2 1
      src/views/reimbursement/index.vue
  16. 6 0
      src/views/saleLeads/detail.vue
  17. 4 3
      src/views/saleLeads/index.vue
  18. 19 2
      src/views/workManagement/handoverSheet/config/customerContact.json
  19. 38 4
      src/views/workManagement/handoverSheet/detail.vue
  20. 2 1
      src/views/workManagement/handoverSheet/index.vue
  21. 23 3
      src/views/workManagement/purchaseApply/detail.vue
  22. 1 0
      src/views/workManagement/purchaseApply/index.vue
  23. 19 0
      src/views/workManagement/requisition/detail.vue
  24. 1 0
      src/views/workManagement/requisition/index.vue
  25. 1 1
      src/views/workManagement/warehousing/config/mainList.json
  26. 33 5
      src/views/workManagement/warehousing/detail.vue
  27. 13 7
      src/views/workManagement/warehousing/index.vue

+ 1 - 1
src/api/landTransportation/index.js

@@ -138,7 +138,7 @@ export function fleetList() {
 //获取省市区
 export function addressList(name) {
     return request({
-        url: '/api/blade-system/region/detail?districtName='+name,
+        url: '/api/blade-system/region/match?address='+name,
         method: 'get'
     })
 }

+ 4 - 2
src/components/crop-select/main.vue

@@ -104,7 +104,7 @@
         <el-button
           type="primary"
           @click="importCorp"
-          :disabled="selectionList.length != 1"
+          :disabled="!multiple && selectionList.length != 1"
           >确 定</el-button
         >
       </span>
@@ -134,7 +134,8 @@ export default {
       page: {
         currentPage: 1,
         pageSize: 10,
-        total: 0
+        total: 0,
+        pageSizes: [10, 50, 100, 200, 300, 400, 500, 1000]
       },
       treeOption: {
         nodeKey: "id",
@@ -218,6 +219,7 @@ export default {
         ...this.selectionList[0],
         index: this.cropIndex
       });
+      this.$emit("getCorpList", [...this.selectionList])
       this.corpVisible = false;
     },
     corpChange(row) {

+ 36 - 13
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -67,19 +67,29 @@
                   type="tree"
                   :dic="dic"
                 ></avue-input-tree>
-                <avue-input-tree
+                <el-cascader
                   v-else-if="item.prop === 'belongtoarea'"
-                  leaf-only
-                  multiple
-                  tags
-                  style="width: 100%;"
-                  size="small"
-                  :props="{ label: 'name', value: 'name' }"
                   v-model="form[item.prop]"
-                  placeholder=" "
-                  type="tree"
-                  :dic="dicArea"
-                ></avue-input-tree>
+                  collapse-tags
+                  :options="dicArea"
+                  :props="props"
+                  size="small"
+                  style="width: 100%;"
+                  :show-all-levels="false"
+                ></el-cascader>
+<!--                <avue-input-tree-->
+<!--                  v-else-if="item.prop === 'belongtoarea'"-->
+<!--                  leaf-only-->
+<!--                  multiple-->
+<!--                  tags-->
+<!--                  style="width: 100%;"-->
+<!--                  size="small"-->
+<!--                  :props="{ label: 'name', value: 'name' }"-->
+<!--                  v-model="form[item.prop]"-->
+<!--                  placeholder=" "-->
+<!--                  type="tree"-->
+<!--                  :dic="dicArea"-->
+<!--                ></avue-input-tree>-->
                 <el-select
                   v-else-if="item.prop === 'adminProfiles'"
                   size="small"
@@ -818,7 +828,12 @@ export default {
       addressData: [],
       formRow: {},
       // 包装要求
-      packageOptions: []
+      packageOptions: [],
+      props: {
+        value: 'name',
+        label: 'name',
+        multiple: true,
+      },
     };
   },
   props: {
@@ -863,6 +878,9 @@ export default {
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
         this.addressData = this.form.corpsAddrList;
+        if (this.form.belongtoarea) {
+          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+        }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
@@ -1074,8 +1092,10 @@ export default {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",");
           }
           this.disabled = true;
+
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.toString();
+            // this.form.belongtoarea = this.form.belongtoarea.toString();
+            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',');
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -1100,6 +1120,9 @@ export default {
                 );
               }
               this.form = res.data.data;
+              if (this.form.belongtoarea) {
+                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+              }
               this.disabled = false;
             }
           });

+ 20 - 12
src/views/basicData/customerManagement/companyMaterial/detailsPageEdit.vue

@@ -56,19 +56,16 @@
                   type="tree"
                   :dic="dic"
                 ></avue-input-tree>
-                <avue-input-tree
+                <el-cascader
                   v-else-if="item.prop === 'belongtoarea'"
-                  leaf-only
-                  multiple
-                  tags
-                  style="width: 100%;"
-                  size="small"
-                  :props="{ label: 'name', value: 'name' }"
                   v-model="form[item.prop]"
-                  placeholder=" "
-                  type="tree"
-                  :dic="dicArea"
-                ></avue-input-tree>
+                  collapse-tags
+                  :options="dicArea"
+                  :props="props"
+                  size="small"
+                  style="width: 100%;"
+                  :show-all-levels="false"
+                ></el-cascader>
                 <el-select
                   v-else-if="item.prop === 'adminProfiles'"
                   size="small"
@@ -255,6 +252,11 @@ export default {
       bankOfDepositData: [],
       dic: [],
       dicArea: [],
+      props: {
+        value: 'name',
+        label: 'name',
+        multiple: true,
+      },
       customerContact: customerContact,
       advantageProject: advantageProject,
       bankOfDeposit: bankOfDeposit,
@@ -574,6 +576,9 @@ export default {
         this.contactsData = this.form.corpsAttnList;
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
+        if (this.form.belongtoarea) {
+          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+        }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
@@ -701,7 +706,7 @@ export default {
           }
           this.disabled = true;
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.toString();
+            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',')
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -721,6 +726,9 @@ export default {
                 message: this.form.id ? "修改成功!" : "新增成功!"
               });
               this.form = res.data.data
+              if (this.form.belongtoarea) {
+                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+              }
               this.disabled = false;
             }
           });

+ 20 - 12
src/views/basicData/customerManagement/supplierMaterial/detailsPageEdit.vue

@@ -56,19 +56,16 @@
                   type="tree"
                   :dic="dic"
                 ></avue-input-tree>
-                <avue-input-tree
+                <el-cascader
                   v-else-if="item.prop === 'belongtoarea'"
-                  leaf-only
-                  multiple
-                  tags
-                  style="width: 100%;"
-                  size="small"
-                  :props="{ label: 'name', value: 'name' }"
                   v-model="form[item.prop]"
-                  placeholder=" "
-                  type="tree"
-                  :dic="dicArea"
-                ></avue-input-tree>
+                  collapse-tags
+                  :options="dicArea"
+                  :props="props"
+                  size="small"
+                  style="width: 100%;"
+                  :show-all-levels="false"
+                ></el-cascader>
                 <el-select
                   v-else-if="item.prop === 'adminProfiles'"
                   size="small"
@@ -260,6 +257,11 @@ export default {
       bankOfDepositData: [],
       dic: [],
       dicArea: [],
+      props: {
+        value: 'name',
+        label: 'name',
+        multiple: true,
+      },
       customerContact: customerContact,
       advantageProject: advantageProject,
       bankOfDeposit: bankOfDeposit,
@@ -591,6 +593,9 @@ export default {
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
         this.addressData = this.form.corpsAddrList.length > 0?this.form.corpsAddrList: [];
+        if (this.form.belongtoarea) {
+          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+        }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
@@ -720,7 +725,7 @@ export default {
           }
           this.disabled = true;
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.toString();
+            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',')
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -740,6 +745,9 @@ export default {
                 message: this.form.id ? "修改成功!" : "新增成功!"
               });
               this.form = res.data.data
+              if (this.form.belongtoarea) {
+                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+              }
               this.disabled = false;
             }
           });

+ 20 - 12
src/views/basicData/factoryInformation/factoryInformation/detailsPageEdit.vue

@@ -59,19 +59,16 @@
                   type="tree"
                   :dic="dic"
                 ></avue-input-tree>
-                <avue-input-tree
+                <el-cascader
                   v-else-if="item.prop === 'belongtoarea'"
-                  leaf-only
-                  multiple
-                  tags
-                  style="width: 100%;"
-                  size="small"
-                  :props="{ label: 'name', value: 'name' }"
                   v-model="form[item.prop]"
-                  placeholder=" "
-                  type="tree"
-                  :dic="dicArea"
-                ></avue-input-tree>
+                  collapse-tags
+                  :options="dicArea"
+                  :props="props"
+                  size="small"
+                  style="width: 100%;"
+                  :show-all-levels="false"
+                ></el-cascader>
                 <el-select
                   v-else-if="item.prop === 'adminProfiles'"
                   size="small"
@@ -335,6 +332,11 @@ export default {
       bankOfDepositData: [],
       dic: [],
       dicArea: [],
+      props: {
+        value: 'name',
+        label: 'name',
+        multiple: true,
+      },
       customerContact: customerContact,
       advantageProject: advantageProject,
       bankOfDeposit: bankOfDeposit,
@@ -753,6 +755,9 @@ export default {
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
         this.addressData = this.form.corpsAddrList;
+        if (this.form.belongtoarea) {
+          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+        }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
@@ -915,7 +920,7 @@ export default {
           }
           this.disabled = true;
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.toString();
+            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',');
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -935,6 +940,9 @@ export default {
                 message: this.form.id ? "修改成功!" : "新增成功!"
               });
               this.form = res.data.data
+              if (this.form.belongtoarea) {
+                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+              }
               this.disabled = false;
             }
           });

+ 20 - 12
src/views/basicData/fleetInformation/detailsPageEdit.vue

@@ -59,19 +59,16 @@
                   type="tree"
                   :dic="dic"
                 ></avue-input-tree>
-                <avue-input-tree
+                <el-cascader
                   v-else-if="item.prop === 'belongtoarea'"
-                  leaf-only
-                  multiple
-                  tags
-                  style="width: 100%;"
-                  size="small"
-                  :props="{ label: 'name', value: 'name' }"
                   v-model="form[item.prop]"
-                  placeholder=" "
-                  type="tree"
-                  :dic="dicArea"
-                ></avue-input-tree>
+                  collapse-tags
+                  :options="dicArea"
+                  :props="props"
+                  size="small"
+                  style="width: 100%;"
+                  :show-all-levels="false"
+                ></el-cascader>
                 <el-select
                   v-else-if="item.prop === 'adminProfiles'"
                   size="small"
@@ -344,6 +341,11 @@ export default {
       bankOfDepositData: [],
       dic: [],
       dicArea: [],
+      props: {
+        value: 'name',
+        label: 'name',
+        multiple: true,
+      },
       customerContact: customerContact,
       advantageProject: advantageProject,
       bankOfDeposit: bankOfDeposit,
@@ -783,6 +785,9 @@ export default {
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
         this.addressData = this.form.corpsAddrList;
+        if (this.form.belongtoarea) {
+          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+        }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
         delete this.form.corpsItems;
@@ -945,7 +950,7 @@ export default {
           }
           this.disabled = true;
           if (this.form.belongtoarea) {
-            this.form.belongtoarea = this.form.belongtoarea.toString();
+            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',');
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -965,6 +970,9 @@ export default {
                 message: this.form.id ? "修改成功!" : "新增成功!"
               });
               this.form = res.data.data
+              if (this.form.belongtoarea) {
+                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+              }
               this.disabled = false;
             }
           });

+ 17 - 1
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1590,6 +1590,14 @@ export default {
         if (item.prop == 'grossProfitRate' || item.prop == 'grossProfit') item.display = false
       })
     }
+    if (this.roleName == 'salesman') {
+      this.customerContact.column.forEach(item => {
+        if (item.prop == 'purchaseAmount') {
+          item.hide = true;
+          item.showColumn = false;
+        }
+      })
+    }
     this.getDefault()
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
@@ -2790,6 +2798,14 @@ export default {
     editCustomer(isBack = false, type) {
       this.$refs["form"].validate((valid) => {
         if (valid) {
+          const length = this.goodsActives === 'gift'? this.contactsData.length: this.goodsShowData.length
+          for (let i = 0;i < length;i++) {
+            const data = this.goodsActives === 'gift'? this.contactsData: this.goodsShowData;
+            console.log(data[i])
+            if (Number(data[i].orderQuantity) > Number(data[i].storageQuantity)) {
+              return this.$message.error('商品信息第' + (Number(i) + 1) + '行订货数量大于库存数量')
+            }
+          }
           //商品信息
           if (this.goodsActives == 'gift') {
             this.form.orderItemsList = this.goodsShowData.concat(this.contactsData)
@@ -2901,7 +2917,7 @@ export default {
             this.saveLoading = false
           })
         } else {
-          return false;
+          return this.$message.error('存在漏填必填项,请补全');
         }
       });
     },

+ 16 - 16
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -802,6 +802,22 @@ export default {
           format: 'yyyy-MM-dd HH:mm:ss',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
           prop: 'arrivalTime'
+        }, {
+          label: '订单号',
+          prop: 'orderNo',
+          disabled: true
+        }, {
+          label: '场站',
+          prop: 'station'
+        }, {
+          label: '业务员',
+          prop: 'salesman',
+          type: 'select',
+          dicUrl: "/api/blade-client/corpsattn/all-list",
+          props: {
+            label: "cname",
+            value: "id"
+          },
         }]
       },
       goodsOptionFormTwo: {
@@ -818,13 +834,6 @@ export default {
             trigger: "blur"
           }],
         }, {
-          label: '订单号',
-          prop: 'orderNo',
-          disabled: true
-        }, {
-          label: '场站',
-          prop: 'station'
-        }, {
           label: '船名航次',
           prop: 'factory'
         }, {
@@ -852,15 +861,6 @@ export default {
           prop: 'siCutoffDate',
           type: 'date'
         }, {
-          label: '业务员',
-          prop: 'salesman',
-          type: 'select',
-          dicUrl: "/api/blade-client/corpsattn/all-list",
-          props: {
-            label: "cname",
-            value: "id"
-          },
-        }, {
           label: '备注',
           span: 24,
           prop: 'remarks'

+ 20 - 18
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -711,7 +711,6 @@ export default {
         }, {
           label: '件数',
           width: 100,
-          search: true,
           index: 6,
           overHidden: true,
           controls: false,
@@ -721,7 +720,6 @@ export default {
         }, {
           label: '包装',
           width: 100,
-          search: true,
           index: 7,
           overHidden: true,
           prop: 'packing',
@@ -734,7 +732,6 @@ export default {
         }, {
           label: '尺码',
           width: 100,
-          search: true,
           index:8,
           overHidden: true,
           prop: 'size',
@@ -816,6 +813,21 @@ export default {
             message: " ",
             trigger: "blur"
           }],
+        }, {
+          label: '订单号',
+          prop: 'orderNo',
+          disabled: true
+        }, {
+          label: '场站',
+          prop: 'station',
+          rules: [{
+            required: false,
+            message: " ",
+            trigger: "blur"
+          }],
+        }, {
+          label: '业务员',
+          prop: 'salesman',
         }]
       },
       goodsOptionFormTwo: {
@@ -832,18 +844,6 @@ export default {
             trigger: "blur"
           }],
         }, {
-          label: '订单号',
-          prop: 'orderNo',
-          disabled: true
-        }, {
-          label: '场站',
-          prop: 'station',
-          rules: [{
-            required: false,
-            message: " ",
-            trigger: "blur"
-          }],
-        }, {
           label: '船名航次',
           prop: 'factory',
           rules: [{
@@ -881,9 +881,6 @@ export default {
           prop: 'siCutoffDate',
           type: 'date'
         }, {
-          label: '业务员',
-          prop: 'salesman',
-        }, {
           label: '备注',
           span: 24,
           prop: 'remarks'
@@ -1510,6 +1507,11 @@ export default {
                     item.region = ''
                   }
                 })
+                this.entrustList.forEach(item=> {
+                  if (!item.arrivalTime){
+                    item.arrivalTime = this.goodsForm.arrivalTime
+                  }
+                })
                 saveSaveList({
                   ...this.goodsForm,
                   kind: '1',

+ 25 - 2
src/views/landTransportation/reportAnalysis/index.vue

@@ -20,6 +20,12 @@
         <template slot="billNo" slot-scope="{row,index}">
           <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{row.billNo}}</span>
         </template>
+        <template slot="corpName" slot-scope="{row,index}">
+          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{row.corpName}}</span>
+        </template>
+        <template slot="orderNo" slot-scope="{row,index}">
+          <span class="el-button--text" style="cursor: pointer" @click.stop="celJump(row,index)">{{row.orderNo}}</span>
+        </template>
         <template slot-scope="{row}" slot="fleetIdSearch">
           <crop-select
               v-model="row.fleetId"
@@ -193,6 +199,13 @@ export default {
             decimals: 2
           }],
         column: [{
+          label: '订单号',
+          prop: 'orderNo',
+          overHidden: true,
+          index: 1,
+          width: 140,
+          search: true,
+        },{
           label: '到厂时间',
           prop: 'arrivalTime',
           overHidden: true,
@@ -257,10 +270,10 @@ export default {
           type: 'number',
           prop: 'profit'
         }, {
-          label: '应陆运费',
+          label: '应陆运费',
           overHidden: true,
           index: 9,
-          prop: 'landAmountC'
+          prop: 'landAmountD'
         }, {
           label: '其他',
           width: 100,
@@ -322,6 +335,11 @@ export default {
           index: 20,
           prop: 'feeRemarksD'
         }, {
+          label: '应付陆运费',
+          overHidden: true,
+          index: 20,
+          prop: 'landAmountC'
+        }, {
           label: '应付场站费',
           width: 100,
           precision: 2,
@@ -576,6 +594,11 @@ export default {
         tag: '0',
         ...params
       }
+      if (queryParams.arrivalTime){
+        queryParams.beginArrivalTime=params.arrivalTime[0]
+        queryParams.endArrivalTime=params.arrivalTime[1]
+        delete queryParams.arrivalTime
+      }
       this.loading = true;
       driverQueryCollection(queryParams).then(res => {
         this.goodsList = res.data.data.records

+ 9 - 0
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -34,8 +34,10 @@
                   v-else-if="item.prop === 'corps'"
                   v-model="form[item.prop]"
                   :multiple="true"
+                  :collapseTags="true"
                   corpType="KH"
                   style="width: 100%"
+                  @getCorpList="getCorpList"
                 ></crop-select>
 <!--                <selectComponent v-else-if="item.prop === 'corps'" v-model="form[item.prop]"-->
 <!--                                 :configuration="configuration" style="width: 100%"/>-->
@@ -789,6 +791,13 @@ export default {
       this.openFullScreen(true)
       this.$message.error(JSON.parse(err.message).msg)
     },
+    getCorpList(data) {
+      let arr = []
+      data.map(e => {
+        arr.push(e.id)
+      })
+      this.form.corps = arr;
+    }
   }
 }
 </script>

+ 10 - 0
src/views/reimbursement/config/customerContact.json

@@ -13,6 +13,16 @@
   "showSummary": true,
   "summaryText": "合计",
   "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum",
+      "decimals": 2
+    },
+    {
+      "name": "quantity",
+      "type": "sum",
+      "decimals": 0
+    }
   ],
   "column": [
     {

+ 19 - 0
src/views/reimbursement/detail.vue

@@ -46,6 +46,7 @@
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
+          v-if="false"
         >复制单据</el-button>
         <el-button
           type="primary"
@@ -139,6 +140,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -254,6 +256,13 @@
       >
       </check-schedule>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="事务-报销单"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -274,6 +283,7 @@ import {dataDetail, typeSave, removeGoods, pleaseCheck} from "@/api/standAlone/r
 import { contrastObj, contrastList } from "@/util/contrastData";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
   name: "detail",
@@ -285,6 +295,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -670,6 +681,14 @@ export default {
         })
       }
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

+ 2 - 1
src/views/reimbursement/index.vue

@@ -33,6 +33,7 @@
             icon="el-icon-plus"
             @click.stop="copyDoc()"
             :disabled="selection.length != 1"
+            v-if="false"
           >复制单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">
@@ -230,7 +231,7 @@ export default {
       this.selection = list;
     },
     goBack() {
-      if (this.$route.query) {
+      if (this.$route.query.check) {
         this.$router.$avueRouter.closeTag(this.$route.fullPath);
         this.$router.push({
           path: "/reimbursement/index"

+ 6 - 0
src/views/saleLeads/detail.vue

@@ -24,6 +24,7 @@
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
+          v-if="false"
         >复制单据</el-button>
         <el-button
           type="primary"
@@ -99,11 +100,13 @@
               icon="el-icon-plus"
               size="small"
               @click.stop="newDetails"
+              :disabled="disabled"
             >录入明细</el-button>
             <el-button
               type="info"
               icon="el-icon-printer"
               size="small"
+              v-if="false"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -112,12 +115,14 @@
               icon="el-icon-edit"
               type="text"
               @click="rowCell(row, index)"
+              :disabled="disabled"
             >{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
             <el-button
               size="small"
               icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
+              :disabled="disabled"
             >删除</el-button>
           </template>
           <template slot="bizDate" slot-scope="{ row, index }">
@@ -499,6 +504,7 @@ export default {
         done()
         if (valid) {
           this.dataList.push({
+            bizDate: getCurrentDate(),
             bizTime: getCurrentDate(),
             bizUserName: this.loginUser,
             bizUser: this.loginUserId,

+ 4 - 3
src/views/saleLeads/index.vue

@@ -33,6 +33,7 @@
             icon="el-icon-plus"
             @click.stop="copyDoc()"
             :disabled="selection.length != 1"
+            v-if="false"
           >复制单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">
@@ -61,7 +62,7 @@
             <el-option
               v-for="(item, index) in contractorOption"
               :key="index"
-              :value="item.realName"
+              :value="item.id"
               :label="item.realName"
             ></el-option>
           </el-select>
@@ -76,7 +77,7 @@
             <el-option
               v-for="(item, index) in oppositePersonOption"
               :key="index"
-              :value="item.realName"
+              :value="item.id"
               :label="item.realName"
             ></el-option>
           </el-select>
@@ -231,7 +232,7 @@ export default {
       this.selection = list;
     },
     goBack() {
-      if (this.$route.query) {
+      if (this.$route.query.check) {
         this.$router.$avueRouter.closeTag(this.$route.fullPath);
         this.$router.push({
           path: "/saleLeads/index"

+ 19 - 2
src/views/workManagement/handoverSheet/config/customerContact.json

@@ -13,6 +13,16 @@
   "showSummary": true,
   "summaryText": "合计",
   "sumColumnList": [
+    {
+      "name": "quantity",
+      "type": "sum",
+      "decimals": 0
+    },
+    {
+      "name": "amount",
+      "type": "sum",
+      "decimals": 2
+    }
   ],
   "column": [
     {
@@ -31,16 +41,23 @@
       "overHidden": true
     },
     {
+      "label": "单位",
+      "prop": "unit",
+      "index": 3,
+      "width": 140,
+      "overHidden": true
+    },
+    {
       "label": "金额",
       "prop": "amount",
-      "index": 3,
+      "index": 4,
       "width": 140,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 4,
+      "index": 5,
       "width": 120,
       "cell": true,
       "overHidden": true

+ 38 - 4
src/views/workManagement/handoverSheet/detail.vue

@@ -46,6 +46,7 @@
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
+          v-if="false"
         >复制单据</el-button>
         <el-button
           type="primary"
@@ -96,6 +97,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -126,6 +128,23 @@
             ></el-input-number>
             <span v-else>{{ row.quantity }}</span>
           </template>
+          <template slot-scope="{ row, index }" slot="unit">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.unit"
+              size="small"
+              clearable
+              filterable
+            >
+              <el-option
+                v-for="(item, index) in unitOption"
+                :key="index"
+                :label="item.dictValue"
+                :value="item.dictValue"
+              />
+            </el-select>
+            <span v-else>{{ row.unit }}</span>
+          </template>
           <template slot="amount" slot-scope="{ row, index }">
             <el-input-number
               v-if="row.$cellEdit"
@@ -158,8 +177,7 @@
         :checkDetail="false"
         :idList="[]"
         @choceCheckFun="choceCheckFun"
-      >
-      </check>
+      />
     </el-dialog>
     <el-dialog
       append-to-body
@@ -176,9 +194,15 @@
         :checkId="checkId"
         :batchNo="batchNo"
         @choceScheduleFun="choceScheduleFun"
-      >
-      </check-schedule>
+      />
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="交接单"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -198,6 +222,7 @@ import { contrastObj, contrastList } from "@/util/contrastData";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
 import {dataDetail, typeSave, removeGoods, pleaseCheck} from "@/api/standAlone/handoverSheet";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
   name: "detail",
@@ -209,6 +234,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -523,6 +549,14 @@ export default {
         })
       }
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

+ 2 - 1
src/views/workManagement/handoverSheet/index.vue

@@ -33,6 +33,7 @@
             icon="el-icon-plus"
             @click.stop="copyDoc()"
             :disabled="selection.length != 1"
+            v-if="false"
           >复制单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">
@@ -203,7 +204,7 @@ export default {
       this.selection = list;
     },
     goBack() {
-      if (this.$route.query) {
+      if (this.$route.query.check) {
         this.$router.$avueRouter.closeTag(this.$route.fullPath);
         this.$router.push({
           path: "/workManagement/handoverSheet/index"

+ 23 - 3
src/views/workManagement/purchaseApply/detail.vue

@@ -46,6 +46,7 @@
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
+          v-if="false"
         >复制单据</el-button>
         <el-button
           type="primary"
@@ -118,6 +119,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -370,14 +372,22 @@
       >
       </check-schedule>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="办公用品-采购"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
 <script>
 import tableOption from "./config/customerContact.json";
 import goodsOption from "./config/commodity.json";
-import {getDeptLazyTree,
-  getGoods,} from "@/api/basicData/customerInquiry";
+// import {getDeptLazyTree,
+//   getGoods,} from "@/api/basicData/customerInquiry";
+import {getDeptLazyTree, getList as getGoods} from "@/api/basicData/commodityType";
 import {
   isDiscount,
   isPercentage,
@@ -392,6 +402,7 @@ import {dataDetail, typeSave, removeGoods, pleaseCheck} from "@/api/officeSuppli
 import { contrastObj, contrastList } from "@/util/contrastData";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
   name: "detail",
@@ -403,6 +414,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -786,7 +798,7 @@ export default {
     onLoad(page, params = {}) {
       let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
+      getGoods(page.currentPage, page.pageSize,obj, this.treeDeptId)
         .then(res => {
           const data = res.data.data;
           this.page.total = data.total;
@@ -966,6 +978,14 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

+ 1 - 0
src/views/workManagement/purchaseApply/index.vue

@@ -33,6 +33,7 @@
             icon="el-icon-plus"
             @click.stop="copyDoc()"
             :disabled="selection.length != 1"
+            v-if="false"
           >复制单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">

+ 19 - 0
src/views/workManagement/requisition/detail.vue

@@ -46,6 +46,7 @@
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
+          v-if="false"
         >复制单据</el-button>
         <el-button
           type="primary"
@@ -117,6 +118,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -369,6 +371,13 @@
       >
       </check-schedule>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="办公用品-领用"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -393,6 +402,7 @@ import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
 import {customerList as storageList} from "@/api/basicData/basicStorageDesc";
 import {getStockList} from "@/api/officeSupplies/stock";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
   name: "detail",
@@ -404,6 +414,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -995,6 +1006,14 @@ export default {
     storageChange(row) {
       this.$set(row, 'storageName', this.storageOptions.find(item => item.id == row.storageId).cname);
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

+ 1 - 0
src/views/workManagement/requisition/index.vue

@@ -33,6 +33,7 @@
             icon="el-icon-plus"
             @click.stop="copyDoc()"
             :disabled="selection.length != 1"
+            v-if="false"
           >复制单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">

+ 1 - 1
src/views/workManagement/warehousing/config/mainList.json

@@ -9,7 +9,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "130",
+  "menuWidth": "90",
   "searchIcon": true,
   "searchIndex": 2,
   "selection": true,

+ 33 - 5
src/views/workManagement/warehousing/detail.vue

@@ -25,7 +25,7 @@
           icon="el-icon-folder-add"
           @click="confirmReceipt"
           :loading="btnLoading"
-          :disabled="disabled"
+          :disabled="disabled || !form.id"
         >确认入库</el-button>
         <el-button
           v-else
@@ -42,6 +42,7 @@
           size="small"
           @click="copyDoc"
           :loading="btnLoading"
+          v-if="false"
         >复制单据</el-button>
         <el-button
           type="primary"
@@ -114,6 +115,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -346,14 +348,22 @@
         >
       </span>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="办公用品-入库"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
 <script>
 import tableOption from "./config/customerContact.json";
 import goodsOption from "./config/commodity.json";
-import {getDeptLazyTree,
-  getGoods,} from "@/api/basicData/customerInquiry";
+// import {getDeptLazyTree,
+//   getGoods,} from "@/api/basicData/customerInquiry";
+import {getDeptLazyTree, getList as getGoods} from "@/api/basicData/commodityType";
 import {
   isDiscount,
   isPercentage,
@@ -371,6 +381,7 @@ import {dataDetail,
   cancelReceipt,} from "@/api/officeSupplies/warehousing";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import {customerList as storageList} from "@/api/basicData/basicStorageDesc";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
   name: "detail",
@@ -379,6 +390,9 @@ export default {
       type: Object
     }
   },
+  components: {
+    reportDialog
+  },
   data() {
     return {
       disabled: false,
@@ -537,9 +551,15 @@ export default {
     storageList().then(res => {
       this.storageOptions = res.data.data.records;
     })
+    getUserInfo().then(res => {
+      this.$set(this.form, 'stockUser', res.data.data.id);
+      this.$set(this.form, 'stockDept', res.data.data.deptId);
+    })
+    this.$set(this.form, 'stockTime', getCurrentDate()); // 默认当前日期
     this.getWorkDicts('unit').then(res => {
       this.unitOption = res.data.data;
     })
+    this.$set(this.form, 'status', 3);
 
     if (this.detailData.query) {
       this.disabled = true;
@@ -599,7 +619,7 @@ export default {
     openEdit() {
       this.disabled = false;
       this.option.column.map(e => {
-        if (this.checkDisabled) {
+        if (this.confirmDisabled) {
           this.$set(e, 'disabled', true)
         } else {
           if (e.prop != 'sysNo') {
@@ -765,7 +785,7 @@ export default {
     onLoad(page, params = {}) {
       let obj = this.deepClone(Object.assign(params, this.search));
       this.loading = true;
-      getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
+      getGoods(page.currentPage, page.pageSize, obj, this.treeDeptId)
         .then(res => {
           const data = res.data.data;
           this.page.total = data.total;
@@ -942,6 +962,14 @@ export default {
     storageChange(row) {
       this.$set(row, 'storageName', this.storageOptions.find(item => item.id == row.storageId).cname);
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
    },
 }
 </script>

+ 13 - 7
src/views/workManagement/warehousing/index.vue

@@ -20,13 +20,15 @@
         @saveColumn="saveColumn"
         @resetColumn="resetColumn"
       >
-        <template slot-scope="scope" slot="menu">
+        <template slot="menuLeft">
           <el-button
-            type="text"
-            icon="el-icon-edit"
             size="small"
-            @click.stop="beforeOpenPage(scope.row, scope.index)"
-          >查看</el-button>
+            type="primary"
+            icon="el-icon-plus"
+            @click.stop="newAdd()"
+          >创建单据</el-button>
+        </template>
+        <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
             icon="el-icon-delete"
@@ -51,6 +53,9 @@
             ></el-option>
           </el-select>
         </template>
+        <template slot="sysNo" slot-scope="scope">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.sysNo }}</span>
+        </template>
       </avue-crud>
     </basic-container>
     <detail-page
@@ -106,6 +111,7 @@ export default {
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
+    this.option.height = window.innerHeight - 240;
   },
   methods: {
     searchCriteriaSwitch(type) {
@@ -141,10 +147,10 @@ export default {
       getList(queryParams).then(res => {
         this.dataList = res.data.data.records;
         this.page.total = res.data.data.total;
-        this.option.height = window.innerHeight - 240;
         this.$nextTick(() => {
           this.$refs.crud.doLayout()
         })
+        this.option.height = window.innerHeight - 240;
       }).finally(() => {
         this.loading = false;
       })
@@ -197,7 +203,7 @@ export default {
       this.selection = list;
     },
     goBack() {
-      if (this.$route.query) {
+      if (this.$route.query.check) {
         this.$router.$avueRouter.closeTag(this.$route.fullPath);
         this.$router.push({
           path: "/workManagement/warehousing/index"