Parcourir la source

【修改】bug
【新增】按钮权限

莫绍宝 il y a 3 ans
Parent
commit
0a2df376bd

+ 2 - 99
src/filters/index.js

@@ -1,7 +1,6 @@
 
-import {
-  COMMON_SELECT
-} from '@/utils/select_data'
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getDictList } from '@/api/common'
 
 /**
  * Show plural label if time is plural number
@@ -112,105 +111,9 @@ export function passwordFilter(value) {
 }
 
 /**
- * 会员的当前状态
- */
-export function MEMBER_CURRENT_STATUS_FILTER(value) {
-  let obj = COMMON_SELECT.MEMBER_CURRENT_STATUS.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 会员的类型
- */
-export function MEMBER_CURRENT_TYPE_FILTER(value) {
-  let obj = COMMON_SELECT.MEMBER_CURRENT_TYPE.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
  * 订单状态
  */
 export function ORDER_CURRENT_STATUS_FILTER(value) {
   let obj = COMMON_SELECT.ORDER_CURRENT_STATUS.find(o => o.value === value);
   return obj ? obj.label : ''
-}
-
-/**
- * 物流状态
- */
-export function EXPRESS_CURRENT_STATE_FILTER(value) {
-  let obj = COMMON_SELECT.EXPRESS_CURRENT_STATE.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 维护订单状态
- */
-export function ORDER_REFUND_CURRENT_STATUS_FILTER(value) {
-  let obj = COMMON_SELECT.ORDER_REFUND_CURRENT_STATUS.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 结算状态
- */
-export function SETTLEMENT_CURRENT_STATUS_FILTER(value) {
-  let obj = COMMON_SELECT.SETTLEMENT_CURRENT_STATUS.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 退款方式
- */
-export function REFUND_CURRENT_TYPE_FILTER(value) {
-  let obj = COMMON_SELECT.REFUND_CURRENT_TYPE.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 券标志
- */
-export function COUPON_CURRENT_FLAG_FILTER(value) {
-  let obj = COMMON_SELECT.COUPON_CURRENT_FLAG.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 秒杀活动状态
- */
-export function SEC_KILL_CURRENT_STATUS_FILTER(value) {
-  let obj = COMMON_SELECT.SEC_KILL_CURRENT_STATUS.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 消息类型
- */
-export function NOTICE_CURRENT_TYPE_FILTER(value) {
-  let obj = COMMON_SELECT.NOTICE_CURRENT_TYPE.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 线下销售状态
- */
- export function OFFLINE_STATUS_FILTER(value) {
-  let obj = COMMON_SELECT.OFFLINE_STATUS.find(o => o.value == value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 线下销售类型
- */
- export function OFFLINE_TYPE_FILTER(value) {
-  let obj = COMMON_SELECT.OFFLINE_TYPE.find(o => o.value === value);
-  return obj ? obj.label : ''
-}
-
-/**
- * 优惠码状态
- */
- export function DISCODE_STATUS_FILTER(value) {
-  let obj = COMMON_SELECT.DISCODE_STATUS.find(o => o.value === value);
-  return obj ? obj.label : ''
 }

+ 3 - 1
src/main.js

@@ -21,11 +21,13 @@ import '@/permission' // permission control
 import * as filters from './filters' // global filters
 
 // 成功/错误提示
-import {successMsg, errorMsg, warningNotify} from '@/utils/common.js'
+import {successMsg, errorMsg, warningNotify, checkBtnRole} from '@/utils/common.js'
 Vue.prototype.$successMsg = successMsg;
 Vue.prototype.$errorMsg = errorMsg;
 Vue.prototype.$warningNotify = warningNotify;
 
+Vue.prototype.$checkBtnRole = checkBtnRole;
+
 // 自定义组件
 import ExportButton from '@/components/Common/export-button.vue'
 Vue.component('ExportButton', ExportButton);

+ 11 - 1
src/utils/common.js

@@ -1,5 +1,6 @@
 
 import { MessageBox, Message, Notification } from 'element-ui'
+import {useRouter, useRoute} from 'vue-router'
 
 export const successMsg = msg => {
 	Message({
@@ -26,8 +27,17 @@ export const warningNotify = msg => {
   });
 };
 
+export const checkBtnRole = (value, route) => {
+  console.log(value);
+  // const route = useRoute;
+  console.log('///////////////');
+  console.log(route);
+  console.log('///////////////');
+};
+
 export default {
   successMsg,
   errorMsg,
-  warningNotify
+  warningNotify,
+  checkBtnRole
 }

+ 1 - 128
src/utils/select_data.js

@@ -3,32 +3,6 @@
  * 管理下拉框选项
  */
 
-// 会员的当前状态
-export const MEMBER_CURRENT_STATUS = [
-  { label: '正常', value: true },
-  { label: '禁用', value: false }
-]
-
-// 会员的当前类型
-export const MEMBER_CURRENT_TYPE = [
-  { label: '普通用户', value: 'GENERAL' },
-  { label: '业务员', value: 'SERVICE' }
-]
-
-// 结算的当前状态
-export const SETTLEMENT_CURRENT_STATUS = [
-  { label: '结算中', value: 'ING' },
-  { label: '已结算', value: 'OVER' },
-  { label: '已取消', value: 'CANCEL' },
-  { label: '异常结算', value: 'EXCEPTION' },
-]
-
-// 运费模板的当前状态
-export const FREIGHT_CURRENT_TYPE = [
-  { label: '启用', value: true },
-  { label: '禁用', value: false }
-]
-
 // 订单的当前状态
 export const ORDER_CURRENT_STATUS = [
   { label: '待付款', value: 'NOPAY' },
@@ -40,108 +14,7 @@ export const ORDER_CURRENT_STATUS = [
   { label: '售后', value: 'REFUND' },
 ]
 
-// 物流的当前状态
-export const EXPRESS_CURRENT_STATE = [
-  { label: '在途', value: 0 },
-  { label: '揽收', value: 1 },
-  { label: '疑难', value: 2 },
-  { label: '签收', value: 3 },
-  { label: '退签', value: 4 },
-  { label: '派件', value: 5 },
-  { label: '退回', value: 6 }
-]
-
-// 维权订单的当前状态
-export const ORDER_REFUND_CURRENT_STATUS = [
-  { label: '待商家处理', value: 'DSJCL' },
-  { label: '待商家收货', value: 'DSJSH' },
-  { label: '待买家处理', value: 'DMJCL' },
-  { label: '已完成', value: 'OVER' },
-  { label: '已取消', value: 'CANCEL' },
-  { label: '已关闭', value: 'CLOSE' },
-]
-
-// 维权订单的当前类型
-export const REFUND_CURRENT_TYPE = [
-  { label: '仅退款', value: 'REFUND_AMOUNT' },
-  { label: '退货退款', value: 'REFUND_GOODS' }
-]
-
-// 优惠券的当前标志
-export const COUPON_CURRENT_FLAG = [
-  { label: '待发布', value: 'WAIT' },
-  { label: '进行中', value: 'START' },
-  { label: '已结束', value: 'END' },
-  { label: '已取消', value: 'CANCEL' }
-]
-
-// 秒杀活动状态
-export const SEC_KILL_CURRENT_STATUS = [
-  { label: '未开始', value: 1 },
-  { label: '进行中', value: 2 },
-  { label: '已结束', value: 3 },
-  { label: '已关闭', value: 4 },
-]
-
-// 消息类型
-export const NOTICE_CURRENT_TYPE = [
-  { label: '订单', value: 1 },
-  { label: '其他', value: 2 }
-]
-
-// 工单大类
-export const ORDER_MAIN_TYPE = [
-  {id: 101, number: 101, name: '家用空调'},
-  {id: 102, number: 102, name: '商用空调'},
-  {id: 103, number: 103, name: '家用空气能热水器'},
-  {id: 104, number: 104, name: '生活电器'},
-  {id: 106, number: 106, name: '晶弘冰箱'},
-  {id: 107, number: 107, name: '手机'},
-  {id: 108, number: 108, name: '回收平台'},
-  {id: 109, number: 109, name: '壁挂炉'},
-  {id: 110, number: 110, name: '智能门锁'},
-  {id: 111, number: 111, name: '移动电源'},
-  {id: 112, number: 112, name: '格健医疗'},
-  {id: 113, number: 133, name: '商用净水机'},
-  // {id: 114, number: 110, name: '螺杆机'},
-  {id: 999, number: 999, name: '清洗服务'},
-]
-
-// 线下销售状态
-export const OFFLINE_STATUS = [
-  { label: '正常', value: 1 },
-  { label: '作废', value: 0 }
-]
-
-// 线下销售类型
-export const OFFLINE_TYPE = [
-  { label: '工程', value: 'PROJECT' },
-  { label: '二手', value: 'RESALE' },
-  { label: '批发', value: 'WHOLESALE' },
-  // { label: '线上', value: 'ONLINE' },
-  { label: '零售', value: 'RETAIL' },
-]
-
-// 优惠码状态
-export const DISCODE_STATUS = [
-  { label: '未使用', value: 0 },
-  { label: '已使用', value: 1 }
-]
 
 export const COMMON_SELECT = {
-  MEMBER_CURRENT_STATUS,
-  MEMBER_CURRENT_TYPE,
-  SETTLEMENT_CURRENT_STATUS,
-  FREIGHT_CURRENT_TYPE,
-  ORDER_CURRENT_STATUS,
-  EXPRESS_CURRENT_STATE,
-  ORDER_REFUND_CURRENT_STATUS,
-  REFUND_CURRENT_TYPE,
-  COUPON_CURRENT_FLAG,
-  SEC_KILL_CURRENT_STATUS,
-  NOTICE_CURRENT_TYPE,
-  ORDER_MAIN_TYPE,
-  OFFLINE_STATUS,
-  OFFLINE_TYPE,
-  DISCODE_STATUS
+  ORDER_CURRENT_STATUS
 }

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

@@ -121,7 +121,7 @@
         <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="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="mainOrderId" 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>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>

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

@@ -136,7 +136,7 @@
     <div class="table" style="margin-top: 20px">
       <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="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="引用单号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></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="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>

+ 3 - 3
src/views/supply/deliver/commerce_list.vue

@@ -90,7 +90,7 @@
             <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="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="refundableQty" min-width="100" 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-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>
@@ -225,7 +225,7 @@ export default {
         specification: this.screenForm.model,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        orderType: 2, // 2家用工程 3商用工程
+        orderType: 3, // 2家用工程 3商用工程
       }
     },
     isShowDetail() {
@@ -265,7 +265,7 @@ export default {
         specification: this.screenForm.model,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        orderType: 2, // 2家用工程 3商用工程
+        orderType: 3, // 2家用工程 3商用工程
       };
       getEnginList(params).then((res) => {
         this.dataList = res.data.records;

+ 28 - 14
src/views/supply/deliver/components/commerce_detail.vue

@@ -113,21 +113,29 @@
       <div class="table">
         <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="orderNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="仓库名称" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编号" prop="productNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="180" 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-tag size="mini" style="margin: 0 5px;" v-for="(item, index) in scope.row.stockIds" :key="index">{{item.name}}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="产品编号" prop="materialCode" 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="unit" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="含税单价" prop="includedPrice" min-width="160" 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="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="税率(%)" prop="rate" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="折扣额" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="折扣后单价" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="refundableQty" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税单价" prop="price" min-width="160" 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="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="税率(%)" prop="tax" 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="singlePayPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="refundStatus" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.refundStatus | refundStatusFilter}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
 
@@ -170,6 +178,12 @@ export default {
         3: '商用工程订单',
       }
       return MAP[val];
+    },
+    refundStatusFilter(val) {
+      const MAP = {
+        1: '正常',
+      }
+      return MAP[val];
     }
   },
   data() {

+ 27 - 13
src/views/supply/deliver/components/deliver_detail.vue

@@ -113,22 +113,30 @@
       <div class="table">
         <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="orderNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="仓库名称" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="200" 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-tag size="mini" style="margin: 0 5px;" v-for="(item, index) in scope.row.stockIds" :key="index">{{item.name}}</el-tag>
+            </template>
+          </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="productNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编号" prop="materialCode" 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="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="含税单价" prop="includedPrice" 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="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="税率(%)" prop="rate" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="折扣额" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="折扣后单价" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" 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="afterTaxPrice" 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="tax" 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="singlePayPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="refundStatus" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.refundStatus | refundStatusFilter}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
 
@@ -175,6 +183,12 @@ export default {
         3: '商用工程订单',
       }
       return MAP[val];
+    },
+    refundStatusFilter(val) {
+      const MAP = {
+        1: '正常',
+      }
+      return MAP[val];
     }
   },
   data() {

+ 27 - 13
src/views/supply/deliver/components/home_detail.vue

@@ -113,22 +113,30 @@
       <div class="table">
         <el-table :data="detailData.shipDocumentOrders" element-loading-text="Loading" border fit highlight-current-row stripe>
           <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="订单号" prop="orderNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="仓库名称" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="订单号" prop="mainOrderId" min-width="180" 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-tag size="mini" style="margin: 0 5px;" v-for="(item, index) in scope.row.stockIds" :key="index">{{item.name}}</el-tag>
+            </template>
+          </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="productNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编号" prop="materialCode" 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="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="含税单价" prop="includedPrice" 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="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="税率(%)" prop="rate" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="折扣额" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="折扣后单价" prop="discountPrice" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" 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="afterTaxPrice" 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="tax" 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="singlePayPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="refundStatus" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.refundStatus | refundStatusFilter}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="materialOldNumber" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
 
@@ -175,6 +183,12 @@ export default {
         3: '商用工程订单',
       }
       return MAP[val];
+    },
+    refundStatusFilter(val) {
+      const MAP = {
+        1: '正常',
+      }
+      return MAP[val];
     }
   },
   data() {

+ 3 - 3
src/views/supply/deliver/deliver_list.vue

@@ -68,10 +68,10 @@
             <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="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="价税合计" prop="totalPrice" 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="noTotalAmount" 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="qty" 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="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="200" fixed="right">
               <template slot-scope="scope">

+ 1 - 1
src/views/supply/deliver/home_list.vue

@@ -85,7 +85,7 @@
             <el-table-column align="center" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税金额" prop="noTotalAmount" 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="qty" 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="remark" min-width="160" 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>

+ 1 - 0
src/views/supply/engin/components/commerce_detail.vue

@@ -157,6 +157,7 @@
           </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="remark" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>

+ 1 - 0
src/views/supply/engin/components/commerce_examine.vue

@@ -143,6 +143,7 @@
         </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="remark" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>

+ 15 - 3
src/views/supply/engin/components/commerce_form.vue

@@ -209,6 +209,7 @@
         </el-table-column>
         <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100"></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="remark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>
@@ -315,17 +316,23 @@
 import { getOrderDetail, getComLoginList, getComLoginDetail, getWarehouseList, addCom, editCom, submitCom, checkStock, getWalletList } from "@/api/supply/engin";
 import { getDictList, getTypeList } from '@/api/common'
 
+let that
 export default {
   name: 'CommerceForm',
   componentName: 'CommerceForm',
   props: ['listItem'],
   filters: {
     status1Filter(val) {
+      let STOCK_ORDER_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_START').dictValue;
+      let STOCK_ORDER_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_END').dictValue;
+      let STOCK_ORDER_HAVE_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_START').dictValue;
+      let STOCK_ORDER_HAVE_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_END').dictValue;
+      let STOCK_ORDER_ALL_NUM = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_ALL_NUM').dictValue;
       if (val === '' || val === null || val === undefined) return '未检查';
       else if (val === 0) return '无货';
-      else if (val > 0 && val <= 30) return val;
-      else if (val > 30 && val <= 1000) return '有货';
-      else if (val > 1000) return '充足';
+      else if (val > STOCK_ORDER_START && val <= STOCK_ORDER_END) return val;
+      else if (val >= STOCK_ORDER_HAVE_START && val <= STOCK_ORDER_HAVE_END) return '有货';
+      else if (val > STOCK_ORDER_ALL_NUM) return '充足';
     },
   },
   data() {
@@ -367,6 +374,7 @@ export default {
         address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
       },
       typeList: [],
+      stockList: [],
       goodsList: [],
 
       isShowDialog: false, // 工程登录列表 - 弹窗
@@ -401,6 +409,10 @@ export default {
     },
   },
 
+  beforeCreate() {
+    that = this;
+  },
+
   created() {
     this.getDictList();
     this.getWalletList();

+ 1 - 0
src/views/supply/engin/components/home_detail.vue

@@ -157,6 +157,7 @@
           </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="remark" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>

+ 1 - 0
src/views/supply/engin/components/home_examine.vue

@@ -143,6 +143,7 @@
         </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="remark" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>

+ 15 - 3
src/views/supply/engin/components/home_form.vue

@@ -215,6 +215,7 @@
         </el-table-column>
         <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100"></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="remark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>
@@ -321,17 +322,23 @@
 import { getOrderDetail, getHomeLoginList, getHomeLoginDetail, getWarehouseList, addHome, editHome, submitHome, checkStock, getWalletList } from "@/api/supply/engin";
 import { getDictList, getTypeList } from '@/api/common'
 
+let that
 export default {
   name: 'HomeForm',
   componentName: 'HomeForm',
   props: ['listItem'],
   filters: {
     status1Filter(val) {
+      let STOCK_ORDER_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_START').dictValue;
+      let STOCK_ORDER_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_END').dictValue;
+      let STOCK_ORDER_HAVE_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_START').dictValue;
+      let STOCK_ORDER_HAVE_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_END').dictValue;
+      let STOCK_ORDER_ALL_NUM = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_ALL_NUM').dictValue;
       if (val === '' || val === null || val === undefined) return '未检查';
       else if (val === 0) return '无货';
-      else if (val > 0 && val <= 30) return val;
-      else if (val > 30 && val <= 1000) return '有货';
-      else if (val > 1000) return '充足';
+      else if (val > STOCK_ORDER_START && val <= STOCK_ORDER_END) return val;
+      else if (val >= STOCK_ORDER_HAVE_START && val <= STOCK_ORDER_HAVE_END) return '有货';
+      else if (val > STOCK_ORDER_ALL_NUM) return '充足';
     },
   },
   data() {
@@ -376,6 +383,7 @@ export default {
       },
       salesTypeList: [],
       typeList: [],
+      stockList: [],
       goodsList: [],
 
       isShowDialog: false, // 工程登录列表 - 弹窗
@@ -410,6 +418,10 @@ export default {
     },
   },
 
+  beforeCreate() {
+    that = this;
+  },
+
   created() {
     this.getDictList();
     this.getWalletList();

+ 3 - 3
src/views/supply/pickup/pickup_list.vue

@@ -62,7 +62,7 @@
             </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="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="发货申请单号" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货申请单号" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.pickTime | dateToDayFilter }}
@@ -151,7 +151,7 @@ export default {
   computed: {
     exParams() {
       return {
-        shipOrderNo: this.screenForm.orderNum,
+        invoiceId: this.screenForm.orderNum,
         createBy: this.screenForm.applyName,
         stockName: this.screenForm.warehouse,
         pickStartTime: this.screenForm.date ? this.screenForm.date[0] : '',
@@ -181,7 +181,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        shipOrderNo: this.screenForm.orderNum,
+        invoiceId: this.screenForm.orderNum,
         createBy: this.screenForm.applyName,
         stockName: this.screenForm.warehouse,
         pickStartTime: this.screenForm.date ? this.screenForm.date[0] : '',

+ 1 - 1
src/views/supply/pickup/sum_list.vue

@@ -153,7 +153,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        shipOrderNo: this.screenForm.orderNum,
+        invoiceId: this.screenForm.orderNum,
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,
         stockName: this.screenForm.warehouse,

+ 17 - 3
src/views/supply/retail/components/retail_form.vue

@@ -260,17 +260,23 @@ import { getDetail, addData, editData, getSalesTypeList, getGoodsList, getWareho
 import { getDictList } from '@/api/common'
 import { findElem } from '@/utils/util'
 
+let that
 export default {
   name: 'RetailForm',
   componentName: 'RetailForm',
   props: ['listItem'],
   filters: {
     status1Filter(val) {
+      let STOCK_ORDER_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_START').dictValue;
+      let STOCK_ORDER_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_END').dictValue;
+      let STOCK_ORDER_HAVE_START = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_START').dictValue;
+      let STOCK_ORDER_HAVE_END = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_HAVE_END').dictValue;
+      let STOCK_ORDER_ALL_NUM = that.stockList.find(o => o.dictCode == 'STOCK_ORDER_ALL_NUM').dictValue;
       if (val === '' || val === null || val === undefined) return '未检查';
       else if (val === 0) return '无货';
-      else if (val > 0 && val <= 30) return val;
-      else if (val > 30 && val <= 1000) return '有货';
-      else if (val > 1000) return '充足';
+      else if (val > STOCK_ORDER_START && val <= STOCK_ORDER_END) return val;
+      else if (val >= STOCK_ORDER_HAVE_START && val <= STOCK_ORDER_HAVE_END) return '有货';
+      else if (val > STOCK_ORDER_ALL_NUM) return '充足';
     },
   },
   data() {
@@ -310,6 +316,7 @@ export default {
       listTotal: 0,
       salesTypeList: [],
       typeList: [],
+      stockList: [],
 
       leftGoodsList: [],
       rightGoodsList: [],
@@ -331,6 +338,10 @@ export default {
     },
   },
 
+  beforeCreate() {
+    that = this;
+  },
+
   created() {
     this.getDictList();
     this.getWarehouseList();
@@ -390,6 +401,9 @@ export default {
       getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
         this.typeList = res.data;
       })
+      getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
+        this.stockList = res.data;
+      })
     },
 
     // 获取商品列表

+ 5 - 6
src/views/supply/retail/retail_list.vue

@@ -70,7 +70,7 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
+            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()" v-if="$checkBtnRole('add', $route.meta.roles)">新增</el-button>
           </div>
           <div class="fr">
             <ExportButton :exUrl="'retail/export'" :exParams="exParams" />
@@ -247,11 +247,10 @@ export default {
   methods: {
     // 查询按钮权限
     checkBtnRole(value) {
-      // let btnRole = this.$route.meta.roles;
-      // if(!btnRole) {return true}
-      // let index = btnRole.indexOf(value);
-      // return index >= 0;
-      return true
+      let btnRole = this.$route.meta.roles;
+      if(!btnRole) {return true}
+      let index = btnRole.indexOf(value);
+      return index >= 0;
     },
 
     // 查询列表

+ 1 - 1
src/views/supply/sales/sales_list.vue

@@ -264,7 +264,7 @@ export default {
       // 获取页面模版
       const result = await new Promise((resolve, reject)=>{
         examineJudge({id: item.id}).then(res => {
-          resolve(res.data);
+          resolve(res.code == 200);
         }).catch(res => {
           resolve(0);
         })