Jelajahi Sumber

Merge branch 'feature/Feature-supply' into develop

莫绍宝 3 tahun lalu
induk
melakukan
e211821fa3

+ 257 - 0
src/components/Common/print-foshan.vue

@@ -0,0 +1,257 @@
+<template>
+  <div class="detail-container">
+    <div class="print-form-1">
+      <el-row :gutter="0">
+        <el-col :span="6" class="item">
+          <div class="label">经销商编码:</div>
+          <div class="value">{{detailData.customerId}}</div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">出库日期:</div>
+          <div class="value">{{nowDate}}</div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">仓库:</div>
+          <div class="value">{{detailData.correspondName}}</div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">信息密钥:</div>
+          <div class="value">{{detailData.informationKey}}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">经销商:</div>
+          <div class="value">{{detailData.customerName}}</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="print-table-1">
+      <div class="head">
+        <el-row :gutter="20">
+          <el-col :span="4">发货单号/订单号</el-col>
+          <el-col :span="3">销售类型</el-col>
+          <el-col :span="3">文件编号</el-col>
+          <el-col :span="8">规格型号</el-col>
+          <el-col :span="3">单位</el-col>
+          <el-col :span="3">数量</el-col>
+        </el-row>
+      </div>
+      <div class="body">
+        <div v-for="(item, index) in detailData.invoicePickBeans" :key="index">
+          <el-row :gutter="20">
+            <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
+            <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
+            <el-col :span="3">{{ item.fileNo || '' }}</el-col>
+            <el-col :span="8">{{ item.specification || '' }}</el-col>
+            <el-col :span="3">{{ item.unit || '' }}</el-col>
+            <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
+            <el-col :span="2">发货日期</el-col>
+            <el-col :span="4">{{ item.theTime || '' }}</el-col>
+            <el-col :span="2">工程编号</el-col>
+            <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
+            <el-col :span="2">备注</el-col>
+            <el-col :span="6">{{ item.remark || '' }}</el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="foot">
+        <el-row :gutter="20">
+          <el-col :span="21">合计</el-col>
+          <el-col :span="3">{{total}}</el-col>
+        </el-row>
+      </div>
+    </div>
+
+    <div class="print-form-2">
+      <el-row :gutter="30">
+        <el-col :span="8" class="item">
+          <div class="label">销售公司</div>
+          <div class="value">
+            <el-input readonly></el-input>
+          </div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">仓库</div>
+          <div class="value">
+            <el-input readonly></el-input>
+          </div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商</div>
+          <div class="value">
+            <el-input readonly></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'PrintGuangzhou',
+  props: {
+    detailData: {
+      type: Object,
+      default: null
+    }
+  },
+
+  computed: {
+    nowDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+          month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+          strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    },
+
+    total() {
+      if(!this.detailData.invoicePickBeans) {
+        return false;
+      }
+      let num = 0;
+      this.detailData.invoicePickBeans.forEach(item => {
+        num = num + item.refundableQty;
+      });
+      return num;
+    }
+  },
+
+  methods: {
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .print-form-1 {
+    .item {
+      display: flex;
+      padding-right: 10px;
+      .label {
+        height: 40px;
+        display: flex;
+        align-items: center;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+        flex-shrink: 0;
+      }
+      .value {
+        flex: 1;
+        height: 40px;
+        display: flex;
+        align-items: center;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+        input {
+          border: none;
+          padding: 0;
+        }
+      }
+    }
+  }
+
+  .print-table-1 {
+    font-size: 14px;
+    margin-top: 20px;
+    margin-bottom: 40px;
+    .el-row {
+      margin-left: 0 !important;
+      margin-right: 0 !important;
+      border: 1px solid #EBEEF5;
+      border-right: none;
+    }
+    .el-col {
+      padding-top: 14px;
+      padding-bottom: 14px;
+      border-right: 1px solid #EBEEF5;
+    }
+    .head {
+      color: #909399;
+      font-weight: bold;
+      .el-col {
+        padding: 0;
+        display: flex;
+        height: 40px;
+        align-items: center;
+      }
+    }
+    .body {
+      color: #333333;
+      .el-row {
+        border-top: none;
+      }
+      .el-col {
+        padding: 0;
+        display: flex;
+        height: 40px;
+        align-items: center;
+        word-break: break-all;
+      }
+    }
+    .foot {
+      color: #333333;
+      margin-top: 20px;
+      border-right: 1px solid #EBEEF5;
+      .el-col {
+        padding: 0;
+        display: flex;
+        height: 40px;
+        align-items: center;
+        word-break: break-all;
+      }
+    }
+  }
+
+  .print-form-2 {
+    .item {
+      display: flex;
+      padding-right: 10px;
+      .label {
+        height: 40px;
+        display: flex;
+        align-items: center;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+        flex-shrink: 0;
+      }
+      .value {
+        flex: 1;
+        height: 40px;
+        display: flex;
+        align-items: center;
+        box-sizing: border-box;
+        font-size: 14px;
+        color: #333333;
+        ::v-deep .el-input input {
+          height: 30px;
+          border: none;
+          border-bottom: 1px solid #EBEEF5;
+          padding: 0 10px;
+        }
+      }
+    }
+  }
+
+</style>

+ 0 - 40
src/components/Common/print-guangzhou.vue

@@ -1,40 +0,0 @@
-<template>
-  <div>
-    <el-button size="small" type="primary" :icon="isIcon ? 'el-icon-download':''" @click="handleExport">{{exText}}</el-button>
-  </div>
-</template>
-
-<script>
-import { downloadFiles } from '@/utils/util'
-
-export default {
-  name: 'ExportButton',
-  props: {
-    exText: {
-      type: String,
-      default: '导出数据'
-    },
-    isIcon: {
-      type: Boolean,
-      default: true
-    },
-    exUrl: {
-      type: String,
-      default: '',
-    },
-    exParams: {
-      type: Object,
-      default: null
-    }
-  },
-  methods: {
-    handleExport() {
-      downloadFiles(this.exUrl, this.exParams);
-    }
-  }
-}
-</script>
-
-<style>
-
-</style>

+ 1 - 1
src/views/supply/engin/commerce_list.vue

@@ -95,7 +95,7 @@
               <template slot-scope="scope">
                 <div>
                   <span>{{scope.row.orderDate | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT'" ></el-button>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" ></el-button>
                 </div>
               </template>
             </el-table-column>

+ 4 - 4
src/views/supply/engin/components/home_detail.vue

@@ -77,14 +77,14 @@
             <div class="label">业务员</div>
             <div class="value">{{detailData.serviceName}}</div>
           </el-col>
-          <el-col :span="24" class="item">
+          <!-- <el-col :span="24" class="item">
             <div class="label">格力回复</div>
             <div class="value">{{detailData.note1}}</div>
           </el-col>
           <el-col :span="24" class="item">
             <div class="label">格力内部备注</div>
             <div class="value">{{detailData.note2}}</div>
-          </el-col>
+          </el-col> -->
           <el-col :span="24" class="item">
             <div class="label">备注</div>
             <div class="value">{{detailData.remark}}</div>
@@ -150,7 +150,7 @@
           </el-table-column>
           <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="使用返利金额" prop="rebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
@@ -226,7 +226,7 @@
           </el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="实际返利金额" prop="rebateAmount" min-width="110" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="实际返利金额" prop="payRebateAmount" min-width="110" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>

+ 2 - 2
src/views/supply/engin/components/home_examine.vue

@@ -78,7 +78,7 @@
           <div class="label">业务员</div>
           <div class="value">{{detailData.serviceName}}</div>
         </el-col>
-        <el-col :span="24" class="item">
+        <!-- <el-col :span="24" class="item">
           <div class="label">格力回复</div>
           <div class="value">
             <el-input v-model="detailData.note1" placeholder="请输入格力回复"></el-input>
@@ -89,7 +89,7 @@
           <div class="value">
             <el-input v-model="detailData.note2" placeholder="请输入格力内部备注"></el-input>
           </div>
-        </el-col>
+        </el-col> -->
         <el-col :span="24" class="item">
           <div class="label">备注</div>
           <div class="value">{{detailData.remark}}</div>

+ 2 - 2
src/views/supply/engin/components/home_form.vue

@@ -98,7 +98,7 @@
             <el-input v-model="mainForm.address" placeholder="请输入安装地址" disabled></el-input>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="24" :lg="24">
+        <!-- <el-col :xs="24" :sm="24" :lg="24">
           <el-form-item label="格力内部备注" prop="greeRemark">
             <el-input v-model="mainForm.greeRemark" placeholder="请输入格力内部备注"></el-input>
           </el-form-item>
@@ -107,7 +107,7 @@
           <el-form-item label="格力回复" prop="greeReply">
             <el-input v-model="mainForm.greeReply" placeholder="请输入格力回复"></el-input>
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :xs="24" :sm="24" :lg="24">
           <el-form-item label="备注" prop="remark">
             <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>

+ 2 - 2
src/views/supply/engin/components/home_return.vue

@@ -80,14 +80,14 @@
           <div class="label">格力回复</div>
           <div class="value">{{detailData.note1}}</div>
         </el-col>
-        <el-col :span="24" class="item">
+        <!-- <el-col :span="24" class="item">
           <div class="label">格力内部备注</div>
           <div class="value">{{detailData.note2}}</div>
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">备注</div>
           <div class="value">{{detailData.remark}}</div>
-        </el-col>
+        </el-col> -->
         <el-col :span="6" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createName}}</div>

+ 1 - 1
src/views/supply/engin/engin_list.vue

@@ -93,7 +93,7 @@
               <template slot-scope="scope">
                 <div>
                   <span>{{scope.row.orderDate | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT'" ></el-button>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" ></el-button>
                 </div>
               </template>
             </el-table-column>

+ 2 - 2
src/views/supply/engin/home_list.vue

@@ -95,7 +95,7 @@
               <template slot-scope="scope">
                 <div>
                   <span>{{scope.row.orderDate | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT'" ></el-button>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" ></el-button>
                 </div>
               </template>
             </el-table-column>
@@ -137,7 +137,7 @@
                 <el-popconfirm style="margin-right: 10px;" title="确定撤回吗?" @onConfirm="handleWithdraw(scope.row.parentId)" v-if="scope.row.examineStatus === 'WAIT'" >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
-                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
+                <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL')">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
                 <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus !== 'FAIL'">退订</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>

+ 22 - 221
src/views/supply/pickup/components/pickup_print.vue

@@ -1,93 +1,15 @@
 <template>
   <div class="detail-container">
-    <div id="printMe">
-      <div class="print-form-1">
-        <el-row :gutter="0">
-          <el-col :span="6" class="item">
-            <div class="label">经销商编码:</div>
-            <div class="value">{{detailData.customerId}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">出库日期:</div>
-            <div class="value">{{getDate()}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">仓库:</div>
-            <div class="value">{{detailData.correspondName}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">信息密钥:</div>
-            <div class="value">{{detailData.informationKey}}</div>
-          </el-col>
-          <el-col :span="24" class="item">
-            <div class="label">经销商:</div>
-            <div class="value">{{detailData.customerName}}</div>
-          </el-col>
-        </el-row>
-      </div>
+    <div class="top-container">
+      <el-radio-group v-model="currentType" size="medium" @change="changeType()">
+        <el-radio-button v-for="(item, index) in typeList" :key="index" :label="item.value">{{item.label}}</el-radio-button>
+      </el-radio-group>
+    </div>
 
-      <div class="print-table-1">
-        <div class="head">
-          <el-row :gutter="20">
-            <el-col :span="4">发货单号/订单号</el-col>
-            <el-col :span="3">销售类型</el-col>
-            <el-col :span="3">文件编号</el-col>
-            <el-col :span="8">规格型号</el-col>
-            <el-col :span="3">单位</el-col>
-            <el-col :span="3">数量</el-col>
-          </el-row>
-        </div>
-        <div class="body">
-          <div v-for="(item, index) in detailData.invoicePickBeans" :key="index">
-            <el-row :gutter="20">
-              <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
-              <el-col :span="3">{{ item.saleTypeName || '' }}</el-col>
-              <el-col :span="3">{{ item.fileNo || '' }}</el-col>
-              <el-col :span="8">{{ item.specification || '' }}</el-col>
-              <el-col :span="3">{{ item.unit || '' }}</el-col>
-              <el-col :span="3">{{ item.refundableQty || 0 }}</el-col>
-            </el-row>
-            <el-row :gutter="20">
-              <el-col :span="4">{{ item.invoiceId || '' }}</el-col>
-              <el-col :span="2">发货日期</el-col>
-              <el-col :span="4">{{ item.theTime || '' }}</el-col>
-              <el-col :span="2">工程编号</el-col>
-              <el-col :span="4">{{ item.refEnginRecordNo || '' }}</el-col>
-              <el-col :span="2">备注</el-col>
-              <el-col :span="6">{{ item.remark || '' }}</el-col>
-            </el-row>
-          </div>
-        </div>
-        <div class="foot">
-          <el-row :gutter="20">
-            <el-col :span="21">合计</el-col>
-            <el-col :span="3">{{total}}</el-col>
-          </el-row>
-        </div>
-      </div>
+    <div id="printMe">
+      
+      <PrintFoshan :detailData="detailData" v-if="currentType === 1" />
 
-      <div class="print-form-2">
-        <el-row :gutter="30">
-          <el-col :span="8" class="item">
-            <div class="label">销售公司</div>
-            <div class="value">
-              <el-input readonly></el-input>
-            </div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">仓库</div>
-            <div class="value">
-              <el-input readonly></el-input>
-            </div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">经销商</div>
-            <div class="value">
-              <el-input readonly></el-input>
-            </div>
-          </el-col>
-        </el-row>
-      </div>
     </div>
     
     <div class="page-footer">
@@ -103,16 +25,26 @@
 <script>
 import print from 'vue-print-nb'
 import { getDetail, addPrint } from "@/api/supply/pickup";
+import PrintFoshan from "@/components/Common/print-foshan";
 
 export default {
   name: 'ReturnDetail',
   componentName: 'ReturnDetail',
   props: ['listItem'],
+  components: {
+    PrintFoshan
+  },
   directives: {
     print
   },
   data() {
     return {
+      currentType: 1,
+      typeList: [
+        { label: '佛山', value: 1 },
+        { label: '广州', value: 2 },
+        { label: '韶关', value: 3 },
+      ],
       printObj: {
         id: 'printMe',
         closeCallback: () => {
@@ -123,16 +55,6 @@ export default {
     }
   },
 
-  computed: {
-    total() {
-      let num = 0;
-      this.listItem.forEach(item => {
-        num = num + item.refundableQty;
-      });
-      return num;
-    }
-  },
-
   created() {
     this.getDetail();
   },
@@ -143,20 +65,8 @@ export default {
       this.$emit('backListFormDetail');
     },
 
-    getDate() {
-      var date = new Date();
-      var seperator1 = "-";
-      var year = date.getFullYear();
-      var month = date.getMonth() + 1;
-      var strDate = date.getDate();
-      if (month >= 1 && month <= 9) {
-          month = "0" + month;
-      }
-      if (strDate >= 0 && strDate <= 9) {
-          strDate = "0" + strDate;
-      }
-      var currentdate = year + seperator1 + month + seperator1 + strDate;
-      return currentdate;
+    changeType() {
+
     },
 
     // 获取详情
@@ -168,7 +78,7 @@ export default {
 
     // 添加次数
     addPrint() {
-      addPrint({ids: this.listItem.invoiceOrderId}).then(res => {
+      addPrint({ids: this.listItem[0].invoiceOrderId}).then(res => {
         // this.$successMsg('提交成功');
         this.$parent.getList();
       })
@@ -182,116 +92,7 @@ export default {
     width: 100%;
     height: 100%;
   }
-  .print-form-1 {
-    .item {
-      display: flex;
-      padding-right: 10px;
-      .label {
-        height: 40px;
-        display: flex;
-        align-items: center;
-        box-sizing: border-box;
-        font-size: 14px;
-        color: #333333;
-        flex-shrink: 0;
-      }
-      .value {
-        flex: 1;
-        height: 40px;
-        display: flex;
-        align-items: center;
-        box-sizing: border-box;
-        font-size: 14px;
-        color: #333333;
-        input {
-          border: none;
-          padding: 0;
-        }
-      }
-    }
-  }
-
-  .print-table-1 {
-    font-size: 14px;
-    margin-top: 20px;
+  .top-container {
     margin-bottom: 20px;
-    .el-row {
-      margin-left: 0 !important;
-      margin-right: 0 !important;
-      border: 1px solid #EBEEF5;
-      border-right: none;
-    }
-    .el-col {
-      padding-top: 14px;
-      padding-bottom: 14px;
-      border-right: 1px solid #EBEEF5;
-    }
-    .head {
-      color: #909399;
-      font-weight: bold;
-      .el-col {
-        padding: 0;
-        display: flex;
-        height: 40px;
-        align-items: center;
-      }
-    }
-    .body {
-      color: #333333;
-      .el-row {
-        border-top: none;
-      }
-      .el-col {
-        padding: 0;
-        display: flex;
-        height: 40px;
-        align-items: center;
-        word-break: break-all;
-      }
-    }
-    .foot {
-      color: #333333;
-      margin-top: 20px;
-      border-right: 1px solid #EBEEF5;
-      .el-col {
-        padding: 0;
-        display: flex;
-        height: 40px;
-        align-items: center;
-        word-break: break-all;
-      }
-    }
-  }
-
-  .print-form-2 {
-    .item {
-      display: flex;
-      padding-right: 10px;
-      .label {
-        height: 40px;
-        display: flex;
-        align-items: center;
-        box-sizing: border-box;
-        font-size: 14px;
-        color: #333333;
-        flex-shrink: 0;
-      }
-      .value {
-        flex: 1;
-        height: 40px;
-        display: flex;
-        align-items: center;
-        box-sizing: border-box;
-        font-size: 14px;
-        color: #333333;
-        ::v-deep .el-input input {
-          height: 30px;
-          border: none;
-          border-bottom: 1px solid #EBEEF5;
-          padding: 0 10px;
-        }
-      }
-    }
   }
-
 </style>

+ 16 - 0
src/views/supply/reserve/components/reserve_form.vue

@@ -53,6 +53,7 @@
     <div style="margin-top: 20px">
       <el-button type="primary" size="small" icon="el-icon-plus" @click="openDialog" v-if="!listItem">添加引用</el-button>
       <el-button type="danger" size="small" icon="el-icon-minus" @click="deleteGoods" :disabled="tableSelection.length < 1" v-if="!listItem">批量删除</el-button>
+      <el-button size="small" icon="el-icon-edit" @click="batchChangeNum" :disabled="tableSelection.length < 1" v-if="!listItem">批量设置预留数量</el-button>
     </div>
     <div class="table" style="margin-top: 20px">
       <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400" @selection-change="tableSelectionChange">
@@ -492,6 +493,21 @@ export default {
       }
     },
 
+    // 批量修改数量
+    batchChangeNum() {
+      this.$prompt('请输入预留数量', '批量设置', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputValidator: function(value) {
+          if(!value) return '请输入预留数量'
+        },
+      }).then(({ value }) => {
+        this.tableSelection.forEach(item => {
+          item.reservedNum = value;
+        })
+      }).catch(() => {});
+    },
+
     // 添加产品
     addGoods() {
       this.goodsList.push({

+ 1 - 1
src/views/supply/retail/retail_list.vue

@@ -98,7 +98,7 @@
               <template slot-scope="scope">
                 <div>
                   <span>{{scope.row.theTime | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" ></el-button>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" v-if="$checkBtnRole('date', $route.meta.roles)" @click="editDate(scope.row)" ></el-button>
                 </div>
               </template>
             </el-table-column>