lichao 3 anos atrás
pai
commit
e90214ed67

+ 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;
             }
           });

+ 9 - 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)
@@ -2901,7 +2909,7 @@ export default {
             this.saveLoading = false
           })
         } else {
-          return false;
+          return this.$message.error('存在漏填必填项,请补全');
         }
       });
     },

+ 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>

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

@@ -139,6 +139,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -254,6 +255,13 @@
       >
       </check-schedule>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="事务-报销单"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -274,6 +282,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 +294,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -670,6 +680,14 @@ export default {
         })
       }
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

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

@@ -230,7 +230,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"

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

@@ -99,6 +99,7 @@
               icon="el-icon-plus"
               size="small"
               @click.stop="newDetails"
+              :disabled="disabled"
             >录入明细</el-button>
             <el-button
               type="info"
@@ -112,12 +113,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 +502,7 @@ export default {
         done()
         if (valid) {
           this.dataList.push({
+            bizDate: getCurrentDate(),
             bizTime: getCurrentDate(),
             bizUserName: this.loginUser,
             bizUser: this.loginUserId,

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

@@ -61,7 +61,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 +76,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 +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: "/saleLeads/index"

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

@@ -31,16 +31,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

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

@@ -96,6 +96,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -126,6 +127,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 +176,7 @@
         :checkDetail="false"
         :idList="[]"
         @choceCheckFun="choceCheckFun"
-      >
-      </check>
+      />
     </el-dialog>
     <el-dialog
       append-to-body
@@ -176,9 +193,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 +221,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 +233,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -523,6 +548,14 @@ export default {
         })
       }
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

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

@@ -203,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/handoverSheet/index"

+ 18 - 0
src/views/workManagement/purchaseApply/detail.vue

@@ -118,6 +118,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -370,6 +371,13 @@
       >
       </check-schedule>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="办公用品-采购"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -392,6 +400,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 +412,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -966,6 +976,14 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
+    // 报表
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
   },
 }
 </script>

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

@@ -117,6 +117,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -369,6 +370,13 @@
       >
       </check-schedule>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="办公用品-领用"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -393,6 +401,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 +413,7 @@ export default {
   components: {
     check,
     checkSchedule,
+    reportDialog
   },
   data() {
     return {
@@ -995,6 +1005,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>

+ 26 - 1
src/views/workManagement/warehousing/detail.vue

@@ -114,6 +114,7 @@
               type="info"
               icon="el-icon-printer"
               size="small"
+              @click="openReport"
             >报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
@@ -346,6 +347,13 @@
         >
       </span>
     </el-dialog>
+    <!--    报表-->
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="办公用品-入库"
+      @onClose="onClose()"
+    />
   </div>
 </template>
 
@@ -371,6 +379,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 +388,9 @@ export default {
       type: Object
     }
   },
+  components: {
+    reportDialog
+  },
   data() {
     return {
       disabled: false,
@@ -537,6 +549,11 @@ 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;
     })
@@ -599,7 +616,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') {
@@ -942,6 +959,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>

+ 9 - 1
src/views/workManagement/warehousing/index.vue

@@ -20,6 +20,14 @@
         @saveColumn="saveColumn"
         @resetColumn="resetColumn"
       >
+        <template slot="menuLeft">
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-add"
+            @click.stop="newAdd()"
+          >创建单据</el-button>
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -197,7 +205,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"