Browse Source

Merge branch 'feature/Feature-supply' into develop

莫绍宝 3 years ago
parent
commit
4726b6f41c

+ 19 - 1
src/api/supply/engin.js

@@ -194,6 +194,15 @@ export function editHome(params) {
   })
 }
 
+// 家用工程订单 - 编辑日期
+export function editDateHome(params) {
+  return request({
+    url: '/engin-order/home-upd-date',
+    method: 'post',
+    data: params
+  })
+}
+
 // 家用工程订单 - 提交审核
 export function submitHome(params) {
   return request({
@@ -273,7 +282,7 @@ export function getComLoginList(params) {
 // 商用工程订单 - 获取工程登录详情
 export function getComLoginDetail(params) {
   return request({
-    url: '/engin-info/detail',
+    url: '/engin-info/ref/detail',
     method: 'get',
     params
   })
@@ -297,6 +306,15 @@ export function editCom(params) {
   })
 }
 
+// 商用工程订单 - 编辑日期
+export function editDateCom(params) {
+  return request({
+    url: '/engin-order/trade-upd-date',
+    method: 'post',
+    data: params
+  })
+}
+
 // 商用工程订单 - 提交审核
 export function submitCom(params) {
   return request({

+ 1 - 0
src/views/supply/apply/apply_list.vue

@@ -87,6 +87,7 @@
             <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="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="已退数量" prop="retiredQty" 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/apply/components/apply_detail.vue

@@ -91,6 +91,7 @@
         <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="申请数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="审批数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="已退数量" prop="retiredQty" 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>
     </div>

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

@@ -87,6 +87,7 @@
             <el-input v-model="scope.row.approvalNumber" size="small" type="number"></el-input>
           </template>
         </el-table-column>
+        <el-table-column align="center" label="已退数量" prop="retiredQty" 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>

+ 22 - 1
src/views/supply/deliver/commerce_list.vue

@@ -19,6 +19,16 @@
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNo">
+                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="合同号" prop="contractNo">
+                <el-input v-model="screenForm.contractNo" placeholder="请输入合同号"></el-input>
+              </el-form-item>
+            </el-col>
             <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="仓库" prop="warehouse">
                 <el-input v-model="screenForm.warehouse" placeholder="请输入仓库"></el-input>
@@ -58,7 +68,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -91,6 +101,11 @@
             <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="refundableQty" 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.salesStatus ? 0 : scope.row.refundableQty}}
+              </template>
+            </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>
@@ -188,6 +203,8 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
+        orderNo: '',
+        contractNo: '',
         warehouse: '',
         jxsName: '',
         chName: '',
@@ -219,6 +236,8 @@ export default {
     exParams() {
       return {
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
@@ -259,6 +278,8 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,

+ 5 - 0
src/views/supply/deliver/components/commerce_detail.vue

@@ -119,6 +119,11 @@
           <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="refundableQty" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+            </template>
+          </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>

+ 5 - 0
src/views/supply/deliver/components/deliver_detail.vue

@@ -120,6 +120,11 @@
           <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="refundableQty" 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.salesStatus ? 0 : scope.row.refundableQty}}
+            </template>
+          </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>

+ 5 - 0
src/views/supply/deliver/components/home_detail.vue

@@ -120,6 +120,11 @@
           <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="refundableQty" 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.salesStatus ? 0 : scope.row.refundableQty}}
+            </template>
+          </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>

+ 14 - 1
src/views/supply/deliver/deliver_list.vue

@@ -11,6 +11,11 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNo">
+                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编号" prop="jxsNum">
                 <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号"></el-input>
               </el-form-item>
@@ -44,7 +49,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -72,6 +77,11 @@
             <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="refundableQty" 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.salesStatus ? 0 : scope.row.refundableQty}}
+              </template>
+            </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">
@@ -153,6 +163,7 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
+        orderNo: '',
         jxsNum: '',
         jxsName: '',
         chName: '',
@@ -175,6 +186,7 @@ export default {
     exParams() {
       return {
         id: this.screenForm.orderNum,
+        mainOrderId: this.screenForm.orderNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
@@ -210,6 +222,7 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
+        mainOrderId: this.screenForm.orderNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,

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

@@ -20,6 +20,16 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNo">
+                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="合同号" prop="contractNo">
+                <el-input v-model="screenForm.contractNo" placeholder="请输入合同号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编号" prop="jxsNum">
                 <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号"></el-input>
               </el-form-item>
@@ -53,7 +63,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -86,6 +96,11 @@
             <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="refundableQty" 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.salesStatus ? 0 : scope.row.refundableQty}}
+              </template>
+            </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="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -179,6 +194,8 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
+        orderNo: '',
+        contractNo: '',
         jxsName: '',
         chName: '',
         model: '',
@@ -209,6 +226,8 @@ export default {
     exParams() {
       return {
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
@@ -249,6 +268,8 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,

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

@@ -175,7 +175,7 @@
 </template>
 
 <script>
-import { getOrderList, applyCom, withdrawCom, deleteCom, editCom } from "@/api/supply/engin";
+import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom } from "@/api/supply/engin";
 import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
 import CommerceForm from "@/views/supply/engin/components/commerce_form";
 import CommerceExamine from "@/views/supply/engin/components/commerce_examine";
@@ -420,7 +420,7 @@ export default {
 
     // 提交 修改订单日期
     submitDateForm() {
-      editCom({
+      editDateCom({
         enginOrderId: this.editId,
         orderDate: this.dateForm.date + ' 00:00:00',
       }).then(res => {

+ 52 - 54
src/views/supply/engin/components/commerce_form.vue

@@ -25,13 +25,15 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" disabled>
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
+      </el-row>
+      <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
             <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
@@ -166,11 +168,11 @@
         </el-table-column>
         <el-table-column align="center" label="返利钱包" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利钱包" size="small" clearable @change="changeFlWallet(scope.$index)">
+            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
               <el-option
-                v-for="item in flWalletList"
+                v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -190,9 +192,9 @@
           <template slot-scope="scope">
             <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
               <el-option
-                v-for="item in xjWalletList"
+                v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -236,7 +238,7 @@
     </div>
 
     <div class="page-footer">
-      <div class="footer" :class="classObj">
+      <div class="footer">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
         <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
@@ -283,7 +285,7 @@
           max-height="270">
           <el-table-column align="center" label="" width="100">
             <template slot-scope="scope">
-              <el-button type="primary" size="small" @click="chooseItem(scope.row.enginInfoId)">选择</el-button>
+              <el-button type="primary" size="small" @click="chooseItem(scope.row.enginInfoNo)">选择</el-button>
             </template>
           </el-table-column>
           <el-table-column align="center" prop="checkTime" label="工程登录日期" show-overflow-tooltip></el-table-column>
@@ -342,7 +344,7 @@ export default {
       mainForm: {
         orderNum: '',
         orderDate: '',
-        type: '',
+        // type: '',
         jxsNum: '',
         jxsName: '',
         enginNum: '',
@@ -374,7 +376,7 @@ export default {
         // phone: [{ required: true, message: '请输入移动电话', trigger: 'blur' }],
         address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
       },
-      typeList: [],
+      // typeList: [],
       stockList: [],
       goodsList: [],
 
@@ -392,31 +394,15 @@ export default {
 
       warehouseList: [],
       warehouseValue: '',
-
-      xjWalletList: [],
-      flWalletList: [],
     }
   },
 
-  computed: {
-    sidebar() {
-      return this.$store.state.app.sidebar
-    },
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
-    },
-  },
-
   beforeCreate() {
     that = this;
   },
 
   created() {
     this.getDictList();
-    this.getWalletList();
     this.getWarehouseList();
 
     if(this.listItem) {
@@ -452,27 +438,11 @@ export default {
       return currentdate;
     },
 
-    // 获取钱包列表
-    getWalletList() {
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'COMMONLY'
-      }).then(res => {
-        this.xjWalletList = res.data;
-      })
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'REBATE'
-      }).then(res => {
-        this.flWalletList = res.data;
-      })
-    },
-
     // 获取产品大类列表
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -494,7 +464,7 @@ export default {
         let data = res.data;
         this.mainForm.orderNum = data.enginOrderId;
         this.mainForm.orderDate = data.orderDate;
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.jxsNum = data.customerId;
         this.mainForm.jxsName = data.customerName;
         this.mainForm.enginNum = data.refEnginRecordNo;
@@ -517,6 +487,12 @@ export default {
         data.items.forEach(item => {
           item.status1 = '';
           item.status2 = '';
+          item.rebateWallets = item.customerWalletList.filter(item => {
+            return item.type === 'REBATE';
+          });
+          item.wallets = item.customerWalletList.filter(item => {
+            return item.type === 'COMMONLY';
+          });
         })
         this.goodsList = data.items;
       })
@@ -566,10 +542,12 @@ export default {
 
     // 选择工程登录
     chooseItem(id) {
-      getComLoginDetail({id}).then(res => {
+      getComLoginDetail({
+        recordNo: id
+      }).then(res => {
         this.isShowDialog = false;
         let data = res.data;
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.enginNum = data.enginInfoNo;
         this.mainForm.enginName = data.projectName;
         this.mainForm.loginType = data.enginSignType;
@@ -582,6 +560,8 @@ export default {
         this.goodsList = data.items.map(item => {
           return {
             useRefCount: '',
+            saleTypeId: item.saleTypeId,
+            saleTypeCode: item.saleTypeCode,
             saleTypeName: item.saleTypeName,
             materialId: item.materialId,
             materialNumber: item.materialNumber,
@@ -603,6 +583,12 @@ export default {
             tax: item.taxRate,
             status1: '',
             status2: '',
+            rebateWallets: item.customerWalletList.filter(item => {
+              return item.type === 'REBATE';
+            }),
+            wallets: item.customerWalletList.filter(item => {
+              return item.type === 'COMMONLY';
+            }),
           }
         })
       })
@@ -616,9 +602,9 @@ export default {
     // 修改返利钱包
     changeFlWallet(index) {
       if(this.goodsList[index].customerWalletId2) {
-        let obj = this.flWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
+        let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
         this.goodsList[index].rebateRate = obj.rebateRate;
-        this.goodsList[index].customerWalletName2 = obj.name;
+        this.goodsList[index].customerWalletName2 = obj.customerWalletName;
       }else {
         this.goodsList[index].rebateRate = '';
         this.goodsList[index].customerWalletName2 = '';
@@ -628,8 +614,8 @@ export default {
     // 修改现金钱包
     changeXjWallet(index) {
       if(this.goodsList[index].customerWalletId) {
-        let obj = this.xjWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
-        this.goodsList[index].customerWalletName = obj.name;
+        let obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
+        this.goodsList[index].customerWalletName = obj.customerWalletName;
       }else {
         this.goodsList[index].customerWalletName = '';
       }
@@ -677,12 +663,24 @@ export default {
             }
           }
 
+          this.goodsList.forEach(item => {
+            delete item.rebateWallets;
+            delete item.wallets;
+          })
+
           let params = {
             enginOrderId: this.mainForm.orderNum,
             // orderDate: this.mainForm.orderDate,
-            mainId: this.mainForm.type || '',
+            // mainId: this.mainForm.type || '',
             refEnginRecordNo: this.mainForm.enginNum || '',
+            refProjectName: this.mainForm.enginName || '',
+            refPromiseStatus: this.mainForm.loginType || '',
             refFactoryNo: this.mainForm.factoryNum || '',
+            refUseUnit: this.mainForm.company || '',
+            refLinkman: this.mainForm.contactMan || '',
+            refTel: this.mainForm.tel || '',
+            refPhone: this.mainForm.phone || '',
+            refInstallAddress: this.mainForm.address || '',
             note2: this.mainForm.greeRemark || '',
             note1: this.mainForm.greeReply || '',
             remark: this.mainForm.remark || '',

+ 57 - 63
src/views/supply/engin/components/home_form.vue

@@ -25,13 +25,20 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-input v-model="mainForm.type" disabled v-if="listItem"></el-input>
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" disabled v-else>
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
+        </el-col> -->
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售类型" prop="saleType">
+            <el-select v-model="mainForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable @change="changeSaleType">
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
@@ -72,13 +79,6 @@
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="销售类型" prop="saleType">
-            <el-select v-model="mainForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable @change="changeSaleType">
-              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="联系人" prop="contactMan">
             <el-input v-model="mainForm.contactMan" placeholder="请输入联系人" disabled></el-input>
           </el-form-item>
@@ -172,11 +172,11 @@
         </el-table-column>
         <el-table-column align="center" label="返利钱包" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利钱包" size="small" clearable @change="changeFlWallet(scope.$index)">
+            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
               <el-option
-                v-for="item in flWalletList"
+                v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -196,9 +196,9 @@
           <template slot-scope="scope">
             <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
               <el-option
-                v-for="item in xjWalletList"
+                v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -242,7 +242,7 @@
     </div>
 
     <div class="page-footer">
-      <div class="footer" :class="classObj">
+      <div class="footer">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
         <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
@@ -296,6 +296,7 @@
           <el-table-column align="center" prop="recordNo" label="工程登录编号" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" prop="projectName" label="工程项目" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" prop="useUnit" label="使用单位" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" prop="organizationName" label="经销商" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
       <div class="pagination clearfix">
@@ -384,7 +385,7 @@ export default {
         address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
       },
       salesTypeList: [],
-      typeList: [],
+      // typeList: [],
       stockList: [],
       goodsList: [],
 
@@ -402,31 +403,15 @@ export default {
 
       warehouseList: [],
       warehouseValue: '',
-
-      xjWalletList: [],
-      flWalletList: [],
     }
   },
 
-  computed: {
-    sidebar() {
-      return this.$store.state.app.sidebar
-    },
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
-    },
-  },
-
   beforeCreate() {
     that = this;
   },
 
   created() {
     this.getDictList();
-    this.getWalletList();
     this.getSalesTypeList();
     this.getWarehouseList();
 
@@ -463,27 +448,11 @@ export default {
       return currentdate;
     },
 
-    // 获取钱包列表
-    getWalletList() {
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'COMMONLY'
-      }).then(res => {
-        this.xjWalletList = res.data;
-      })
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'REBATE'
-      }).then(res => {
-        this.flWalletList = res.data;
-      })
-    },
-
     // 获取产品大类列表
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -538,6 +507,12 @@ export default {
         data.items.forEach(item => {
           item.status1 = '';
           item.status2 = '';
+          item.rebateWallets = item.customerWalletList.filter(item => {
+            return item.type === 'REBATE';
+          });
+          item.wallets = item.customerWalletList.filter(item => {
+            return item.type === 'COMMONLY';
+          });
         })
         this.goodsList = data.items;
       })
@@ -597,7 +572,7 @@ export default {
         this.isShowDialog = false;
         let data = res.data;
         this.mainForm.type = data.productCategory;
-        this.mainForm.loginUserId = data.userid
+        this.mainForm.loginUserId = data.userid;
         // this.mainForm.saleType = '';
         this.mainForm.loginNum = data.recordNo;
         this.mainForm.enginName = data.projectName;
@@ -608,10 +583,14 @@ export default {
         this.mainForm.phone = data.buyUnitPhone;
         this.mainForm.address = data.installAddress;
 
+        let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
+
         this.goodsList = data.items.map(item => {
           return {
             useRefCount: '',
-            saleTypeName: '',
+            saleTypeId: saleTypeItem.id,
+            saleTypeCode: saleTypeItem.saleCode,
+            saleTypeName: saleTypeItem.saleName,
             materialId: item.materialId,
             materialNumber: '',
             materialOldNumber: item.code,
@@ -632,6 +611,12 @@ export default {
             tax: '',
             status1: '',
             status2: '',
+            rebateWallets: item.customerWalletList.filter(item => {
+              return item.type === 'REBATE';
+            }),
+            wallets: item.customerWalletList.filter(item => {
+              return item.type === 'COMMONLY';
+            }),
           }
         })
       })
@@ -639,12 +624,9 @@ export default {
 
     // 选择销售类型
     changeSaleType() {
-      let obj = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
-      this.goodsList.forEach(item => {
-        item.saleTypeId = obj.id;
-        item.saleTypeCode= obj.saleCode;
-        item.saleTypeName = obj.saleName;
-      })
+      if(this.mainForm.loginNum) {
+        this.chooseItem(this.mainForm.loginNum);
+      }
     },
 
     // 删除产品
@@ -655,9 +637,9 @@ export default {
     // 修改返利钱包
     changeFlWallet(index) {
       if(this.goodsList[index].customerWalletId2) {
-        let obj = this.flWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
+        let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
         this.goodsList[index].rebateRate = obj.rebateRate;
-        this.goodsList[index].customerWalletName2 = obj.name;
+        this.goodsList[index].customerWalletName2 = obj.customerWalletName;
       }else {
         this.goodsList[index].rebateRate = '';
         this.goodsList[index].customerWalletName2 = '';
@@ -667,8 +649,8 @@ export default {
     // 修改现金钱包
     changeXjWallet(index) {
       if(this.goodsList[index].customerWalletId) {
-        let obj = this.xjWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
-        this.goodsList[index].customerWalletName = obj.name;
+        let obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
+        this.goodsList[index].customerWalletName = obj.customerWalletName;
       }else {
         this.goodsList[index].customerWalletName = '';
       }
@@ -716,14 +698,26 @@ export default {
             }
           }
 
+          this.goodsList.forEach(item => {
+            delete item.rebateWallets;
+            delete item.wallets;
+          })
+
           let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
           let params = {
             enginOrderId: this.mainForm.orderNum,
             // orderDate: this.mainForm.orderDate,
-            mainId: this.mainForm.type || '',
+            // mainId: this.mainForm.type || '',
             loginUserId: this.mainForm.loginUserId,
             refEnginRecordNo: this.mainForm.loginNum || '',
+            refProjectName: this.mainForm.enginName || '',
+            refPromiseStatus: this.mainForm.loginType || '',
             refFactoryNo: this.mainForm.factoryNum || '',
+            refUseUnit: this.mainForm.company || '',
+            refLinkman: this.mainForm.contactMan || '',
+            refTel: this.mainForm.tel || '',
+            refPhone: this.mainForm.phone || '',
+            refInstallAddress: this.mainForm.address || '',
             saleTypeId: this.mainForm.saleType,
             saleTypeCode: saleTypeItem.saleCode,
             saleTypeName: saleTypeItem.saleName,

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

@@ -175,7 +175,7 @@
 </template>
 
 <script>
-import { getOrderList, applyHome, withdrawHome, deleteHome, editHome } from "@/api/supply/engin";
+import { getOrderList, applyHome, withdrawHome, deleteHome, editDateHome } from "@/api/supply/engin";
 import HomeDetail from "@/views/supply/engin/components/home_detail";
 import HomeForm from "@/views/supply/engin/components/home_form";
 import HomeExamine from "@/views/supply/engin/components/home_examine";
@@ -414,7 +414,7 @@ export default {
 
     // 提交 修改订单日期
     submitDateForm() {
-      editHome({
+      editDateHome({
         enginOrderId: this.editId,
         orderDate: this.dateForm.date + ' 00:00:00',
       }).then(res => {

+ 1 - 1
src/views/supply/pickup/check.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="invoiceNum" 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="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>

+ 2 - 2
src/views/supply/pickup/components/pickup_form.vue

@@ -96,7 +96,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="approvalNumber" 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>
       </div>
     </div>
@@ -104,7 +104,7 @@
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
-        <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px;">
+        <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px;" v-if="!listItem">
           <el-button slot="reference">重 置</el-button>
         </el-popconfirm>
       </div>

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

@@ -467,9 +467,9 @@ export default {
     openDialog() {
       this.getSalesTypeList();
       this.isShowDialog = true;
-      if(this.mainForm.type) {
+      // if(this.mainForm.type) {
         this.getGoodsList();
-      }
+      // }
     },
 
     // 提交筛选表单

+ 2 - 2
src/views/supply/return/return_list.vue

@@ -6,8 +6,8 @@
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="发货单号" prop="orderNum">
-                <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
+              <el-form-item label="退换单号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入退换单号"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">

+ 1 - 1
src/views/supply/sales/components/sales_detail.vue

@@ -49,7 +49,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="approvalNumber" 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>

+ 1 - 1
src/views/supply/sales/components/sales_examine.vue

@@ -48,7 +48,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="approvalNumber" 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>

+ 3 - 3
src/views/supply/sales/sales_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="approvalNumber" 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="remark" min-width="160" show-overflow-tooltip></el-table-column>
@@ -180,7 +180,7 @@ export default {
   computed: {
     exParams() {
       return {
-        status: this.screenForm.status,
+        examineStatus: this.screenForm.status,
         orderNo: this.screenForm.orderNum,
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,
@@ -217,7 +217,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        status: this.screenForm.status,
+        examineStatus: this.screenForm.status,
         orderNo: this.screenForm.orderNum,
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,