Преглед изворни кода

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

caojunjie пре 2 година
родитељ
комит
7009efac48

+ 36 - 4
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -8,9 +8,38 @@
   "addBtn": false,
   "delBtn": false,
   "headerAlign": "center",
-  "menuWidth": 180,
+  "menuWidth": 200,
   "refreshBtn": false,
+  "indexSlot": true,
   "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "sliceNumber",
+      "type": "sum",
+      "decimals": 2
+    },
+    {
+      "name": "storageInQuantity",
+      "type": "sum",
+      "decimals": 3
+    },
+    {
+      "name": "price",
+      "type": "sum",
+      "decimals": 2
+    },
+    {
+      "name": "balanceNumber",
+      "type": "sum",
+      "decimals": 2
+    },
+    {
+      "name": "balanceMoney",
+      "type": "sum",
+      "decimals": 2
+    }
+  ],
   "column": [
     {
       "index": 1,
@@ -31,7 +60,7 @@
         "value": "id"
       },
       "dicData": [],
-      "filterable":true,
+      "filterable": true,
       "cell": true,
       "rules": [
         {
@@ -52,7 +81,7 @@
         "value": "id"
       },
       "dicData": [],
-      "filterable":true,
+      "filterable": true,
       "overHidden": true,
       "cell": true,
       "rules": [
@@ -131,6 +160,9 @@
       "label": "片数",
       "overHidden": true,
       "cell": true,
+      "type":"number",
+      "controls":false,
+      "precision":0,
       "rules": [
         {
           "required": true,
@@ -250,4 +282,4 @@
       "width": 100
     }
   ]
-}
+}

+ 1 - 1
src/views/purchasingManagement/inStock/config/mainList.json

@@ -133,7 +133,7 @@
       "overHidden": true
     },
     {
-      "label": "审状态",
+      "label": "审状态",
       "prop": "status",
       "index": 13,
       "width": 120,

+ 41 - 19
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -15,11 +15,11 @@
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
           <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
-            审处理<i class="el-icon-arrow-down el-icon--right"></i>
+            审处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审批数据</el-dropdown-item>
-            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
+            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
+            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -56,6 +56,10 @@
               @click.stop="excelBox = true">导入
             </el-button>
           </template>
+          <template slot="headerSerial">
+            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+              :disabled="detailData.status == 1" circle></el-button>
+          </template>
           <template slot="oneCode" slot-scope="{ row, index }">
             <el-popover placement="right" width="160" trigger="click">
               <el-image style="width: 160px; height: 80px" :src="row.oneCode" :fit="fit"></el-image>
@@ -77,13 +81,25 @@
               style="width:100%" placeholder="请输入"></el-input-number>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
-              :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "编辑" }}</el-button>
-            <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
-              :disabled="detailData.status == 1">删除</el-button>
-            <el-button size="small" icon="el-icon-printer" type="text" @click="rowPrint(row, index)"
-              :disabled="!row.id">
-              打印</el-button>
+            <div style="display:flex;justify-content: center;">
+              <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+                :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "编辑" }}</el-button>
+              <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                :disabled="detailData.status == 1">删除</el-button>
+              <el-button size="small" icon="el-icon-printer" type="text" @click="rowPrint(row, index)"
+                :disabled="!row.id">
+                打印</el-button>
+              <div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
+                <el-tooltip effect="dark" content="向上移动" placement="top">
+                  <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
+                    @click="moveUp(row, index)" style="color:#409EFF;"></i>
+                </el-tooltip>
+                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (itemsVOList.length - 1)"
+                    :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
+                    style="color:#409EFF;"></i></el-tooltip>
+              </div>
+            </div>
+
           </template>
         </avue-crud>
       </trade-card>
@@ -92,14 +108,14 @@
         :inCropId="true" :tabShow="3" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
       <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
         delUrl="" />
-      <el-dialog append-to-body title="审进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
+      <el-dialog append-to-body title="审进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
         :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
       </el-dialog>
     </div>
     <el-dialog title="导入" append-to-body :close-on-click-modal="false" :visible.sync="excelBox" width="555px">
-      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+      <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter" :upload-error="uploadError">
         <template slot="excelTemplate">
           <el-button type="primary" @click="getTemplate">
             点击下载<i class="el-icon-download el-icon--right"></i>
@@ -125,8 +141,8 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
-      subLoading:false,
-      buttonLoading:false,
+      subLoading: false,
+      buttonLoading: false,
       form: {},
       excelBox: false,
       excelOption: {
@@ -234,7 +250,7 @@ export default {
             span: 6
           },
           {
-            label: "审状态",
+            label: "审状态",
             prop: "status",
             type: "select",
             dataType: 'number',
@@ -351,7 +367,7 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          this.itemsVOList.push({ $cellEdit: true });
+          this.itemsVOList.push({ $cellEdit: true, unit: '1' });
           this.getStorage()
         } else {
           return false;
@@ -424,7 +440,7 @@ export default {
           }
           let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
-          this.buttonLoading=false;
+          this.buttonLoading = false;
           let data = {
             ...this.form,
             billType: 'RK',
@@ -467,7 +483,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.$confirm("确定审此订单?", {
+          this.$confirm("确定审此订单?", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning"
@@ -493,7 +509,7 @@ export default {
           })
         })
       } else {
-        this.$confirm("确定审此订单?", {
+        this.$confirm("确定审此订单?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -589,6 +605,12 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
+    moveUp(row, index) {
+      this.itemsVOList[index] = this.itemsVOList.splice(index - 1, 1, row)[0]
+    },
+    moveDown(row, index) {
+      this.itemsVOList[index] = this.itemsVOList.splice(index + 1, 1, row)[0]
+    },
     async resetColumn() {
       this.tableOption = tableOption;
       const inSave = await this.delColumnData(

+ 23 - 1
src/views/salesManagement/outStock/config/customerContact.json

@@ -8,9 +8,28 @@
   "addBtn": false,
   "delBtn": false,
   "headerAlign": "center",
-  "menuWidth": 180,
+  "menuWidth": 160,
   "refreshBtn": false,
   "showSummary": true,
+  "indexSlot": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "sliceNumber",
+      "type": "sum",
+      "decimals": 2
+    },
+    {
+      "name": "storageInQuantity",
+      "type": "sum",
+      "decimals": 3
+    },
+    {
+      "name": "price",
+      "type": "sum",
+      "decimals": 2
+    }
+  ],
   "column": [
     {
       "index": 1,
@@ -147,6 +166,9 @@
       "label": "片数",
       "overHidden": true,
       "cell": true,
+      "type":"number",
+      "controls":false,
+      "precision":0,
       "rules": [
         {
           "required": true,

+ 1 - 1
src/views/salesManagement/outStock/config/mainList.json

@@ -134,7 +134,7 @@
       "overHidden": true
     },
     {
-      "label": "审状态",
+      "label": "审状态",
       "prop": "status",
       "index": 13,
       "width": 120,

+ 33 - 21
src/views/salesManagement/outStock/detailsPage.vue

@@ -15,11 +15,11 @@
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
           <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
-            审处理<i class="el-icon-arrow-down el-icon--right"></i>
+            审处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审批数据</el-dropdown-item>
-            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
+            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
+            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -53,11 +53,15 @@
             </el-button>
             <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板
             </el-button>
-            <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1"
+            <!-- <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1"
               @click.stop="addRow">导入
-            </el-button>
+            </el-button> -->
             <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
           </template>
+          <template slot="headerSerial">
+            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+              :disabled="detailData.status == 1" circle></el-button>
+          </template>
           <template slot="oneCode" slot-scope="{ row, index }">
             <el-popover placement="right" width="160" trigger="click">
               <el-image style="width: 160px; height: 80px" :src="row.oneCode" :fit="fit"></el-image>
@@ -86,6 +90,15 @@
                 :disabled="detailData.status == 1">删除</el-button>
               <!-- <el-button size="small" icon="el-icon-printer" type="text" @click="rowPrint(row, index)" :disabled="!row.id">
                 打印</el-button> -->
+              <div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
+                <el-tooltip effect="dark" content="向上移动" placement="top">
+                  <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
+                    @click="moveUp(row, index)" style="color:#409EFF;"></i>
+                </el-tooltip>
+                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (itemsVOList.length - 1)"
+                    :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
+                    style="color:#409EFF;"></i></el-tooltip>
+              </div>
             </div>
           </template>
         </avue-crud>
@@ -95,7 +108,7 @@
         :inCropId="true" :tabShow="2" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
       <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
         delUrl="" />
-      <el-dialog append-to-body title="审进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
+      <el-dialog append-to-body title="审进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
         :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
@@ -198,7 +211,7 @@ export default {
             span: 6
           },
           {
-            label: "审状态",
+            label: "审状态",
             prop: "status",
             type: "select",
             dataType: 'number',
@@ -276,13 +289,6 @@ export default {
       this.getGenerate(this.$route.query.generateId);
     }
   },
-  activated() {
-    setTimeout(() => {
-      if (this.$route.query.generateId) {
-        this.getGenerate(this.$route.query.generateId);
-      }
-    }, 100);
-  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -383,14 +389,14 @@ export default {
           delete res.data.data.createUserName
           delete res.data.data.sysNo
           delete res.data.data.status
-          res.data.data.stockTime=getCurrentDate()
+          res.data.data.stockTime = getCurrentDate()
           res.data.data.itemsVOList.forEach(e => {
             delete e.id
           })
           this.form = res.data.data;
-          this.itemsVOList = res.data.data.itemsVOList.filter(e => e.isIssue == 'N');
+          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 0);
           this.oldform = this.deepClone(res.data.data);
-          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(e => e.isIssue == 'N'));
+          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 0));
           this.getStorage()
         })
         .finally(() => {
@@ -452,7 +458,7 @@ export default {
         }).then(() => {
           financingExcess({ id: this.form.purchaserId }).then(res => {
             if (res.data.data == '操作成功') {
-              this.$confirm("确定审此订单?", {
+              this.$confirm("确定审此订单?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 type: "warning"
@@ -477,7 +483,7 @@ export default {
                 this.buttonLoading = false
               })
             } else {
-              this.$confirm("此订单余额不足,是否继续确认提交审?", {
+              this.$confirm("此订单余额不足,是否继续确认提交审?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 type: "warning"
@@ -507,7 +513,7 @@ export default {
       } else {
         financingExcess({ id: this.form.purchaserId }).then(res => {
           if (res.data.data == '操作成功') {
-            this.$confirm("确定审此订单?", {
+            this.$confirm("确定审此订单?", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning"
@@ -532,7 +538,7 @@ export default {
               this.buttonLoading = false
             })
           } else {
-            this.$confirm("此订单余额不足,是否继续确认提交审?", {
+            this.$confirm("此订单余额不足,是否继续确认提交审?", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning"
@@ -605,6 +611,12 @@ export default {
     openReport() {
       this.$router.push(`/myiframe/urlPath?name=preview-木材库-出库单.ureport.xml&src=${this.website.reportUrl}/preview?_u=blade-木材库-出库单.ureport.xml&id=${this.form.id}`);
     },
+    moveUp(row, index) {
+      this.itemsVOList[index] = this.itemsVOList.splice(index - 1, 1, row)[0]
+    },
+    moveDown(row, index) {
+      this.itemsVOList[index] = this.itemsVOList.splice(index + 1, 1, row)[0]
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(191),

+ 1 - 2
src/views/salesManagement/outStock/index.vue

@@ -31,7 +31,7 @@
                 </template>
             </avue-crud>
         </basic-container>
-        <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+        <detail-page ref="detail" @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
     </div>
 </template>
 
@@ -79,7 +79,6 @@ export default {
         })
     },
     activated() {
-        console.log(this.show)
         setTimeout(() => {
             if (this.$route.query.generateId && this.show) {
                 // this.detailData.id = this.$route.query.generateId