Jelajahi Sumber

Merge branch 'feature/Feature-supply' into develop

莫绍宝 3 tahun lalu
induk
melakukan
e8701b3e79

+ 6 - 10
src/views/supply/adjust/adjust_list.vue

@@ -60,7 +60,7 @@
         </div>
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-            <el-table-column align="center" label="发货单号" prop="deliverNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货单号" prop="deliverNo" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货日期" prop="deliverDate" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="orderType" min-width="120" show-overflow-tooltip>
@@ -68,20 +68,16 @@
                 {{ scope.row.orderType | typeFilter }}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="订单号" prop="orderNo" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单号" prop="orderNo" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="规格型号" prop="specification" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="价税合计" prop="mustTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="无税金额" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.qty * scope.row.afterTaxPrice }}
-              </template>
-            </el-table-column>
+            <el-table-column align="center" label="无税金额" prop="noTaxTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="备注" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="备注" prop="remark" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制表人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="100" fixed="right">

+ 1 - 1
src/views/supply/adjust/components/adjust_detail.vue

@@ -86,7 +86,7 @@
           <el-table-column align="center" label="产品编号" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="申请数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></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="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>

+ 1 - 1
src/views/supply/apply/components/apply_detail.vue

@@ -39,7 +39,7 @@
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
-            <div class="file-list">
+            <div class="file-list" v-if="detailData.fileUrl">
               <div class="file-item">
                 <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
                 <div v-else class="box2" @click="openLink(detailData.fileUrl)">

+ 45 - 0
src/views/supply/apply/components/apply_examine.vue

@@ -36,6 +36,23 @@
           <div class="label">备注</div>
           <div class="value">{{detailData.remark}}</div>
         </el-col>
+        <el-col :span="24" class="item file">
+          <div class="label">附件</div>
+          <div class="value">
+            <div class="file-list" v-if="detailData.fileUrl">
+              <div class="file-item">
+                <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
+                <div v-else class="box2" @click="openLink(detailData.fileUrl)">
+                  <img src="@/assets/common/word.png" v-if="checkFileType(detailData.fileUrl) == 'word'" />
+                  <img src="@/assets/common/excel.png" v-if="checkFileType(detailData.fileUrl) == 'excel'" />
+                  <img src="@/assets/common/ppt.png" v-if="checkFileType(detailData.fileUrl) == 'ppt'" />
+                  <img src="@/assets/common/pdf.png" v-if="checkFileType(detailData.fileUrl) == 'pdf'" />
+                  <div class="name ellipsis-3">{{ detailData.fileName }}</div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-col>
         <el-col :span="8" class="item">
           <div class="label">制单人</div>
           <div class="value">{{detailData.createBy}}</div>
@@ -149,6 +166,7 @@ export default {
   },
   data() {
     return {
+      imageURL: this.$imageUrl,
       detailData: {},
       goodsList: [],
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
@@ -225,6 +243,33 @@ export default {
       }
     },
 
+    // 检查文件类型
+    checkFileType(url) {
+      if(!url) return '';
+			const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
+
+			if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
+				return 'image';
+			}else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
+				return 'word';
+			}else if(['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
+				return 'excel';
+			}else if(['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)) {
+				return 'ppt';
+			}else if(['pdf'].includes(fileSuffix)) {
+				return 'pdf';
+			}else {
+        return '';
+      }
+		},
+
+    // 打开链接
+    openLink(url) {
+      getFileUrl({key: url}).then(res => {
+        window.open(res.data);
+      })
+    },
+
     // 提交审批
     clickSubmitForm() {
       for(let i=0; i<this.goodsList.length; i++) {

+ 1 - 6
src/views/supply/apply/components/apply_form.vue

@@ -329,11 +329,6 @@ export default {
         mainId: this.screenForm.type,
         id: this.screenForm.orderNum,
       }).then(res => {
-        res.data.records.forEach(item => {
-          item.mainOrderId = item.id;
-          delete item.id;
-        });
-
         let oldGoodsList = this.goodsList;
         let newGoodsList = res.data.records;
         for(let i = 0; i < oldGoodsList.length; i++) {
@@ -415,7 +410,7 @@ export default {
       for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
         let flag = true;  // 建立标记,判断数据是否重复,true为不重复
         for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
-          if(allArr[i].materialId == newArr[j].materialId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+          if(allArr[i].orderId == newArr[j].orderId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false;
           }
         }

+ 1 - 1
src/views/supply/apply/components/engin_detail.vue

@@ -75,7 +75,7 @@
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
-            <div class="file-list">
+            <div class="file-list" v-if="detailData.fileUrl">
               <div class="file-item">
                 <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
                 <div v-else class="box2" @click="openLink(detailData.fileUrl)">

+ 112 - 6
src/views/supply/apply/components/engin_examine.vue

@@ -75,7 +75,7 @@
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
-            <div class="file-list">
+            <div class="file-list" v-if="detailData.fileUrl">
               <div class="file-item">
                 <el-image v-if="checkFileType(detailData.fileUrl) == 'image'" class="img" :src="imageURL + detailData.fileUrl" :preview-src-list="[imageURL + detailData.fileUrl]"></el-image>
                 <div v-else class="box2" @click="openLink(detailData.fileUrl)">
@@ -117,10 +117,18 @@
     </div>
 
     <div class="table" style="margin-top: 20px">
-      <el-table :data="detailData.orders" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+      <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
         <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="订单日期" prop="theTime" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="发货仓库" prop="stockIds" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.stockIds" placeholder="请选择发货仓库" size="small" multiple filterable @change="changeWarehouse(scope.$index)">
+              <el-option :label="item.name" :value="item.id" v-for="(item, index) in positionList" :key="index"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="库存数" prop="stockNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单日期" prop="theTime" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="物料代码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
@@ -175,20 +183,42 @@
 </template>
 
 <script>
-import { getEnginDetail, examineEngin } from "@/api/supply/apply";
+import { getEnginDetail, examineEngin, getPositionList, checkStock } from "@/api/supply/apply";
 
 export default {
   name: 'EnginExamine',
   componentName: 'EnginExamine',
   props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+        { label: '已关闭', value: 'CLOSE' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    },
+    enginTypeFilter(val) {
+      const MAP = {
+        HOME: '家用',
+        TRADE: '商用',
+      }
+      return MAP[val];
+    }
+  },
   data() {
     return {
+      imageURL: this.$imageUrl,
       detailData: {},
       userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
 
       examineForm: {
         remark: '',
-      }
+      },
+      positionList: [],
     }
   },
 
@@ -234,11 +264,87 @@ export default {
     getDetail() {
       getEnginDetail({id: this.listItem.id}).then(res => {
         this.detailData = res.data;
+
+        res.data.orders.forEach((item, index) => {
+          if(item.stockIds && item.stockIds.length > 0) {
+            item.stockIds = item.stockIds.map((it, idx) => {
+              return it.id;
+            });
+          }
+        });
+
+        this.goodsList = res.data.orders;
+        this.getPositionList();
+      })
+    },
+
+    // 获取仓位列表
+    getPositionList() {
+      getPositionList({
+        correspondId: this.detailData.correspondId
+      }).then((res) => {
+        this.positionList = res.data;
+      })
+    },
+
+    // 修改仓位
+    changeWarehouse(index) {
+      if(this.goodsList[index].stockIds && this.goodsList[index].stockIds.length > 0) {
+        checkStock({
+          materialId: this.goodsList[index].materialId,
+          StockIds: this.goodsList[index].stockIds.join(',')
+        }).then(res => {
+          this.goodsList[index].stockNumber = res.data;
+        })
+      }else {
+        this.goodsList[index].stockNumber = 0;
+      }
+    },
+
+    // 检查文件类型
+    checkFileType(url) {
+      if(!url) return '';
+			const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
+
+			if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
+				return 'image';
+			}else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
+				return 'word';
+			}else if(['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
+				return 'excel';
+			}else if(['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)) {
+				return 'ppt';
+			}else if(['pdf'].includes(fileSuffix)) {
+				return 'pdf';
+			}else {
+        return '';
+      }
+		},
+
+    // 打开链接
+    openLink(url) {
+      getFileUrl({key: url}).then(res => {
+        window.open(res.data);
       })
     },
 
     // 提交审批
     clickSubmitForm(val) {
+      for(let i=0; i<this.goodsList.length; i++) {
+        if(!this.goodsList[i].approvalNumber) {
+          this.$errorMsg('请填写审批数量');
+          return;
+        }
+        if(this.goodsList[i].approvalNumber > this.goodsList[i].stockNumber) {
+          this.$errorMsg('审批数量不可大于库存数');
+          return;
+        }
+        if(this.goodsList[i].approvalNumber > this.goodsList[i].invoiceNum) {
+          this.$errorMsg('审批数量不可大于申请数量');
+          return;
+        }
+      }
+
       this.$confirm('此操作将审批订单, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -248,7 +354,7 @@ export default {
           id: this.detailData.id,
           examineStatus: val,
           approvalRemark: this.examineForm.remark,
-          orders: this.detailData.orders,
+          orders: this.goodsList,
         };
         examineEngin(params).then(res => {
           this.$successMsg();

+ 6 - 10
src/views/supply/apply/components/engin_form.vue

@@ -464,11 +464,6 @@ export default {
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         correspondId: this.screenForm.warehouse,
       }).then(res => {
-        res.data.records.forEach(item => {
-          item.mainOrderId = item.id;
-          delete item.id;
-        });
-
         let oldGoodsList = this.goodsList;
         let newGoodsList = res.data.records;
         for(let i = 0; i < oldGoodsList.length; i++) {
@@ -548,7 +543,7 @@ export default {
       for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
         let flag = true;  // 建立标记,判断数据是否重复,true为不重复
         for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
-          if(allArr[i].materialId == newArr[j].materialId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+          if(allArr[i].orderId == newArr[j].orderId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
             flag = false;
           }
         }
@@ -572,6 +567,11 @@ export default {
 
     // 确定 添加产品
     submitAddGoods() {
+      let list = this.goodsList.concat(this.tableSelection);
+      if(!this.isAllEqual(list)) {
+        return this.$errorMsg('只能选择同一个工程编号的订单');
+      }
+
       let allList = this.tableGoodsList;
       let selectList = this.tableSelection;
       let submitList = [];
@@ -585,10 +585,6 @@ export default {
       }
       // this.goodsList = this.goodsList.concat(submitList);
 
-      if(!this.isAllEqual(submitList)) {
-        return this.$errorMsg('只能选择同一个工程编号的订单');
-      }
-
       this.goodsList = this.delRepeat(submitList, this.goodsList);
       this.isShowDialog = false;
       this.tableGoodsList = [];

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

@@ -81,7 +81,7 @@
             <el-table-column align="center" label="发货申请单" prop="id" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货申请日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程登录编码" prop="enginOrderNo" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录编码" prop="enginOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="使用单位" prop="refUseUnit" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>

+ 5 - 3
src/views/supply/engin/commerce_list.vue

@@ -91,7 +91,7 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -99,10 +99,10 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeId" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="货品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -230,6 +230,7 @@ export default {
   computed: {
     exParams() {
       return {
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,
@@ -269,6 +270,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,

+ 5 - 3
src/views/supply/engin/home_list.vue

@@ -91,7 +91,7 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -99,10 +99,10 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeId" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="货品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -230,6 +230,7 @@ export default {
   computed: {
     exParams() {
       return {
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,
@@ -269,6 +270,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
+        examineStatus: this.screenForm.status,
         enginOrderNo: this.screenForm.orderNum,
         refProjectNo: this.screenForm.enginNum,
         refEnginRecordNo: this.screenForm.loginNum,

+ 2 - 2
src/views/supply/retail/components/retail_detail.vue

@@ -77,10 +77,10 @@
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" 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="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" 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="customerWalletName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">

+ 2 - 2
src/views/supply/retail/components/retail_examine.vue

@@ -58,10 +58,10 @@
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="数量" prop="qty" 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="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">

+ 4 - 0
src/views/supply/retail/retail_list.vue

@@ -111,6 +111,7 @@
             <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="出库数量" prop="hasSendQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="可退数量" prop="refundableQty" min-width="100" show-overflow-tooltip></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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="120" show-overflow-tooltip></el-table-column>
@@ -324,6 +325,9 @@ export default {
 
     // 进入退订
     toReturn(item) {
+      if(item.refundableQty < 1) {
+        return this.$errorMsg('可退数量为0');
+      }
       this.queryItem = item;
       this.isShowReturn = true;
     },