howie 3 rokov pred
rodič
commit
a6aa0ee1c8

+ 1 - 10
src/App.vue

@@ -1,13 +1,4 @@
-<!--
- * @Author: howie
- * @Date: 2022-06-02 09:55:42
- * @LastEditors: howie
- * @LastEditTime: 2022-07-08 16:40:44
- * @FilePath: \supply-front\src\App.vue
- * @Description:
- *
- * Copyright (c) 2022, All Rights Reserved.
--->
+
 <template>
   <div id="app">
     <router-view />

+ 2 - 1
src/store/getters.js

@@ -10,6 +10,7 @@ const getters = {
   menus: state => state.user.menus,
   customerId: state => state.user.customerId,
   customerName: state => state.user.customerName,
-  showMessages: state => state.user.showMessages
+  showMessages: state => state.user.showMessages,
+  code:state =>state.sales.code
 }
 export default getters

+ 3 - 3
src/store/modules/sales.js

@@ -2,7 +2,7 @@
  * @Author: howie
  * @Date: 2022-06-18 14:33:08
  * @LastEditors: howie
- * @LastEditTime: 2022-06-29 10:03:21
+ * @LastEditTime: 2022-07-13 17:13:15
  * @FilePath: \supply-front\src\store\modules\sales.js
  * @Description:
  *
@@ -27,7 +27,7 @@ const state = {
 }
 
 const mutations = {
-  setId(state,id){
+   setId(state,id){
        state.code = id
        console.log('setId',id);
   }
@@ -40,7 +40,7 @@ const actions = {
   }) {
     return new Promise((resolve, reject) => {
       getId().then(res=>{
-          commit('setId',res.data)
+          // commit('setId',res.data)
           resolve()
       })
     })

+ 128 - 176
src/views/basic_data/material/components/material_list-detail.vue

@@ -16,7 +16,7 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="使用组织" size="small">
-              <el-input v-model="detail.useOrgId" size="small"></el-input>
+              <el-input v-model="detail.useOrgName" size="small"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -309,68 +309,53 @@
               <span>存储</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="库存单位" size="small">
-                      <el-select v-model="value">
-                        <el-option label="普通仓库"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
-             </el-col
-              >
+              <el-col :span="24">
+                <el-form-item label="库存单位" size="small">
+                  <el-select v-model="value">
+                    <el-option label="普通仓库"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="换算方向" size="small">
-                      <el-select v-model="value">
-                        <el-option label="普通仓库"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
-              </el-col
-              >
+              <el-col :span="24">
+                <el-form-item label="换算方向" size="small">
+                  <el-select v-model="value">
+                    <el-option label="普通仓库"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                     <el-form-item label="仓库" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
+              <el-col :span="24">
+                <el-form-item label="仓库" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                  <el-form-item label="仓位" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
+              <el-col :span="24">
+                <el-form-item label="仓位" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                 <el-form-item label="单箱标准数量" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-                </el-col>
+              <el-col :span="24">
+                <el-form-item label="单箱标准数量" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <div class="base-header">
               <span>库存控制</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
+              <el-col :span="24">
                 <el-form-item label="可锁库" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-               </el-col>
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+              </el-col>
             </el-row>
           </div>
           <div>
@@ -378,94 +363,72 @@
               <span>管理</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="启用批号管理" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="启用批号管理" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                    <el-form-item label="批号编码规则" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="批号编码规则" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-
-                 <el-form-item label="启用保质期管理" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="启用保质期管理" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="批号附属信息" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
+              <el-col :span="24">
+                <el-form-item label="批号附属信息" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                 <el-form-item label="保质期单位" size="small">
-                      <el-select v-model="value">
-                        <el-option label="普通仓库"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
-              </el-col
-              >
+              <el-col :span="24">
+                <el-form-item label="保质期单位" size="small">
+                  <el-select v-model="value">
+                    <el-option label="普通仓库"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-
-                 <el-form-item label="在架寿命期" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
+              <el-col :span="24">
+                <el-form-item label="在架寿命期" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <div class="base-header">
               <span>库存成本</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="参考成本" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="参考成本" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                  <el-form-item label="成本单位" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="成本单位" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="币别" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="币别" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
           </div>
           <div>
@@ -474,65 +437,47 @@
             </div>
             <el-row>
               <el-col :span="24">
-
-                  <el-form-item label="启用" size="small">
-                  </el-form-item>
-                  <el-form-item label="最小库存预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-                   <el-form-item label="安全库存预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-                   <el-form-item label="最大库存预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-                   <el-form-item label="在订货点预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-
+                <el-form-item label="启用" size="small"> </el-form-item>
+                <el-form-item label="最小库存预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+                <el-form-item label="安全库存预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+                <el-form-item label="最大库存预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+                <el-form-item label="在订货点预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                 <el-form-item label="最小库存" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-                </el-col>
+              <el-col :span="24">
+                <el-form-item label="最小库存" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                  <el-form-item label="再定货点" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-
+              <el-col :span="24">
+                <el-form-item label="再定货点" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="经济订货批量" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-
+              <el-col :span="24">
+                <el-form-item label="经济订货批量" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="最大库存" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-
+              <el-col :span="24">
+                <el-form-item label="最大库存" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
           </div>
@@ -620,11 +565,11 @@
           <br />
           <el-row>
             <el-col :span="6">
-                <el-form-item label="商城分类" size="small">
-                      <el-select v-model="value">
-                        <el-option label="挂式空调"> </el-option>
-                      </el-select>
-                    </el-form-item>
+              <el-form-item label="商城分类" size="small">
+                <el-select v-model="value">
+                  <el-option label="挂式空调"> </el-option>
+                </el-select>
+              </el-form-item>
             </el-col>
           </el-row>
           <div>
@@ -656,12 +601,17 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="是否允许订货" size="small">
-                      <el-select v-model="value1">
-                        <el-option label="是"> </el-option>
-                        <el-option label="否"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
+                <el-select v-model="dinghuo">
+                  <el-option label="是" :value="true"> </el-option>
+                  <el-option label="否" :value="false"> </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="是否允许置换" size="small">
+                <el-select v-model="zhihuan">
+                  <el-option label="是" :value="true"> </el-option>
+                  <el-option label="否" :value="false"> </el-option>
+                </el-select>
+              </el-form-item>
             </el-col>
           </el-row>
           <!-- <el-button >保存</el-button> -->
@@ -681,8 +631,10 @@ export default {
   },
   data() {
     return {
-      value1:'是'
-    }
+      value1: "是",
+      dinghuo: true,
+      zhihuan: true,
+    };
   },
   created() {
     console.log(this.detail);
@@ -797,7 +749,7 @@ export default {
     margin-bottom: 0;
   }
 }
-::v-deep .el-select{
+::v-deep .el-select {
   width: 100%;
 }
 </style>

+ 30 - 31
src/views/basic_data/material/components/modify_list-apply.vue

@@ -99,7 +99,7 @@
                 <el-button
                   type="text"
                   class="textColor"
-                  @click="hanleDeleInd(scope.$index,scope.row.cid)"
+                  @click="hanleDeleInd(scope.$index, scope.row.cid)"
                   >删除</el-button
                 >
               </template>
@@ -115,7 +115,9 @@
                 <el-form-item>
                   <el-select
                     placeholder="请选择销售类型"
-                    @change="handleSale($event, scope.$index,scope.row.saleTypes)"
+                    @change="
+                      handleSale($event, scope.$index, scope.row.saleTypes)
+                    "
                     v-model="scope.row.mainId"
                   >
                     <el-option
@@ -195,7 +197,7 @@
             >
               <template slot-scope="scope">
                 <el-form-item>
-                  <el-input disabled  v-model="scope.row.unit"></el-input>
+                  <el-input disabled v-model="scope.row.unit"></el-input>
                 </el-form-item>
               </template>
             </el-table-column>
@@ -914,24 +916,22 @@ export default {
     });
   },
   methods: {
-    handleSale(e, index,saleTypes) {
+    handleSale(e, index, saleTypes) {
 
-      let saleArr = []
-      this.rebateList = this.rebateList.filter((k) => {
-
-          saleArr = saleTypes.filter((i) => {
-            return e == i.id;
-          })
-          return saleArr[0].id === k.saleTypeId
+      let saleArr = [];
+      let rebateList =[]
+     rebateList = this.rebateList.filter((k) => {
 
+        return e === k.saleTypeId;
       });
+        saleArr = saleTypes.filter((i) => {
+               return e == i.id;
+          });
 
-
-      this.items[index].mainName = saleArr[0].mainName
-      this.items[index].saleTypeId = saleArr[0].id
-      this.items[index].saleTypeName = saleArr[0].saleName
-      this.$set(this.items[index], "rebateList", this.rebateList);
-      console.log(this.rebateList,this.items[index]);
+      // this.items[index].mainName = saleArr[0].mainName;
+      this.items[index].saleTypeId = saleArr[0].id;
+      this.items[index].saleTypeName = saleArr[0].saleName;
+      this.$set(this.items[index], "rebateList", rebateList);
       this.fang = false;
     },
     // xua
@@ -1015,20 +1015,19 @@ export default {
     indexMethod(index) {
       console.log(index);
     },
-    hanleDeleInd(index,id) {
-        if (id) {
-          const dataArr = JSON.parse(JSON.stringify(this.dataList))
-          for (let j = 0; j < dataArr.length; j++) {
-             if (id== dataArr[j].id) {
-
-                  dataArr[j].disabled = false
-                 this.$set(dataArr[j],'disabled',false)
-            }}
-
-            this.dataList = dataArr
-
+    hanleDeleInd(index, id) {
+      if (id) {
+        const dataArr = JSON.parse(JSON.stringify(this.dataList));
+        for (let j = 0; j < dataArr.length; j++) {
+          if (id == dataArr[j].id) {
+            dataArr[j].disabled = false;
+            this.$set(dataArr[j], "disabled", false);
+          }
         }
 
+        this.dataList = dataArr;
+      }
+
       this.items.splice(index, 1);
     },
     handleDetermine() {
@@ -1147,8 +1146,8 @@ export default {
       // row.disabled == undefined 才能被选中
       if (row.disabled == undefined || row.disabled == false) {
         return true;
-      }else{
-        return false
+      } else {
+        return false;
       }
       // 函数必须有返回值且是布尔值
       // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)

+ 2 - 2
src/views/basic_data/material/modify_list.vue

@@ -129,13 +129,13 @@
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="center"
               label="产品品类"
               prop="mainName"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            ></el-table-column> -->
             <el-table-column
               align="center"
               label="存货编码"

+ 1 - 1
src/views/login/index.vue

@@ -572,7 +572,7 @@ $light_gray: #eee;
   position: relative;
   width: 360px;
   height: 50px;
-  margin-bottom: 20px;
+  margin-bottom: 25px;
   background: #ffffff;
   border: 1px solid #e6e6e6 !important;
   border-radius: 4px;

+ 12 - 16
src/views/sales_policy/codealer_list.vue

@@ -3,8 +3,8 @@
     <el-header height="100%" class="mg">
       <el-form
         size="small"
-        :model="searchForm"
-        ref="searchForm"
+        :model="screenForm"
+        ref="screenForm"
         :inline="false"
       >
         <el-row :gutter="20">
@@ -12,7 +12,7 @@
             <el-form-item prop="code">
               <el-input
                 size="small"
-                v-model="searchForm.code"
+                v-model="screenForm.code"
                 placeholder="销售政策编号"
               ></el-input>
             </el-form-item>
@@ -21,7 +21,7 @@
             <el-form-item prop="remark">
               <el-input
                 size="small"
-                v-model="searchForm.remark"
+                v-model="screenForm.remark"
                 placeholder="销售政策说明"
               ></el-input>
             </el-form-item>
@@ -30,7 +30,7 @@
             <el-form-item prop="title">
               <el-input
                 size="small"
-                v-model="searchForm.title"
+                v-model="screenForm.title"
                 placeholder="表头备注"
               ></el-input>
             </el-form-item>
@@ -124,7 +124,7 @@
 </template>
 
 <script>
-import { getCustomerlist,getPolicyDetail } from "@/api/policy_list";
+import { getCustomerlist, getPolicyDetail } from "@/api/policy_list";
 import Minxin from "@/mixin";
 import Distributor from "./components/Distributor";
 export default {
@@ -132,10 +132,10 @@ export default {
   data() {
     return {
       isShow: true,
-      id:'',
+      id: "",
       input: "",
       dataList: [],
-      searchForm: {
+      screenForm: {
         code: "",
         remark: "",
         title: "",
@@ -144,27 +144,23 @@ export default {
   },
   methods: {
     getList() {
-
       this.listLoading = true;
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        code: this.searchForm.code,
-        remark: this.searchForm.remark,
-        title: this.searchForm.title,
+        code: this.screenForm.code,
+        remark: this.screenForm.remark,
+        title: this.screenForm.title,
       };
       getCustomerlist(params).then((res) => {
         console.log(res);
         this.dataList = res.data.records;
-        this.listTotal = res.data.total
+        this.listTotal = res.data.total;
         this.listLoading = false;
       });
-
-
     },
   },
   components: {
-
     Distributor,
   },
 };

+ 5 - 0
src/views/sales_policy/components/AddCondition.vue

@@ -20,6 +20,8 @@
             v-for="(item, index) in conditionBox"
             :key="index"
           >
+            <h5 v-if="index == 0">限定机型</h5>
+            <h5 v-if="index > 0">配提机型</h5>
             <el-row>
               <el-row class="pdt">
                 <el-button
@@ -104,6 +106,8 @@
             v-for="(item, index) in conditionBoxs"
             :key="index"
           >
+            <h5 v-if="index == 0">限定机型</h5>
+            <h5 v-if="index > 0">配提机型</h5>
             <el-row>
               <el-row>
                 <el-table style="width: 100%" :data="item" border>
@@ -468,6 +472,7 @@ export default {
         this.$parent.isShow = 8;
       } else {
         this.$parent.isCondition = 0;
+        Object.assign(this.$data, this.$options.data());
       }
     },
     /**

+ 49 - 43
src/views/sales_policy/components/AddPolicy.vue

@@ -14,15 +14,14 @@
           <el-divider></el-divider>
           <el-form
             :model="searchForm"
-
-            ref="searchForm"
+            ref="form"
             label-width="120px"
             size="small"
             class="demo-searchForm"
           >
             <el-row>
               <el-col :xs="24" :ms="12" :lg="12">
-                <el-form-item label="销售政策编号" >
+                <el-form-item label="销售政策编号">
                   <el-input
                     disabled
                     v-model="searchForm.code"
@@ -103,7 +102,7 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :ms="24" :lg="24">
-                <el-form-item label="政策封面图" >
+                <el-form-item label="政策封面图">
                   <ImageUpload :fileList="fileList" :multiple="false" />
                 </el-form-item>
               </el-col>
@@ -120,7 +119,6 @@
                 </h4>
                 <template>
                   <el-upload
-
                     class="import-btn"
                     :action="baseURL + 'student/import'"
                     :http-request="handleImport"
@@ -265,7 +263,13 @@
             </el-table-column>
             <el-table-column prop="name" label="限定条件" align="center">
               <template slot-scope="scope">
-              <el-input v-model="scope.row.name" style="text-align: center;" placeholder="请输入名称" :disabled="scope.row.fang" @blur="handleConditionName(scope.row)"></el-input>
+                <el-input
+                  v-model="scope.row.name"
+                  style="text-align:center"
+                  placeholder="请输入名称"
+                  :disabled="scope.row.fang"
+                  @blur="handleConditionName(scope.row)"
+                ></el-input>
               </template>
             </el-table-column>
             <el-table-column
@@ -278,7 +282,7 @@
                 <el-button
                   type="text"
                   size="small"
-                  @click="scope.row.fang=false"
+                  @click="scope.row.fang = false"
                   >编辑</el-button
                 >
                 <el-button
@@ -313,7 +317,7 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from "vuex";
+import { mapGetters, mapMutations } from "vuex";
 import Minxin from "@/mixin";
 import {
   addPoliy,
@@ -323,7 +327,7 @@ import {
   deleteCondition,
   getConditionList,
   deleteMaterialPolicy,
-  updateCondition
+  updateCondition,
 } from "@/api/policy_list";
 import { getDictList } from "@/api/common";
 import { downloadFiles, handleImport } from "@/utils/util";
@@ -372,28 +376,22 @@ export default {
       dictList: [],
     };
   },
-  computed: mapState({
-    comCode: (state) => {
-      console.log(state, "kkkk");
-      return state.sales.code;
-    },
-    // newForm:(state) => {
-    //   return state.sales.searchForm;
-    // },
-    // imgFile:(state) => {
-    //   return state.sales.fileList;
-    // },
-  }),
+  computed: {
+    ...mapGetters({
+      comCode: "code",
+    }),
+  },
+
   mounted() {
-    // console.log(this.comCode, "kkjk");
     this.searchForm.code = this.comCode;
   },
   updated() {
-    console.log(this.comCode, "kkjk");
     this.searchForm.code = this.comCode;
   },
   created() {
     this.getCommonApi();
+    // console.log(this.$store.code);
+
     if (this.$parent.isFlag) {
       // this.handletwoList()
     }
@@ -444,13 +442,12 @@ export default {
         this.dictList = res.data;
       });
     },
-    handleConditionName(row){
+    handleConditionName(row) {
       console.log(row.name);
-      updateCondition({id:row.id,name:row.name}).then(res=>{
-        this.$successMsg('修改成功')
-        row.fang = true
-      })
-
+      updateCondition({ id: row.id, name: row.name }).then((res) => {
+        this.$successMsg("修改成功");
+        row.fang = true;
+      });
     },
     handleSubmitCon() {
       const params = {
@@ -459,12 +456,9 @@ export default {
       // 获取条件政策
       getConditionList(params).then((res) => {
         for (let i = 0; i < res.data.length; i++) {
-           res.data[i].name = ''
-           res.data[i].fang = true
-
+          res.data[i].fang = true;
         }
         this.conditionList = res.data;
-
       });
     },
     handelStop() {
@@ -482,7 +476,7 @@ export default {
       const formData = new FormData();
       formData.append("file", file);
       formData.append("policyId", this.searchForm.code);
-        // formData.append("mainId", this.searchForm.mainId);
+      // formData.append("mainId", this.searchForm.mainId);
       let result = await handleImport("/policy/material/import", formData);
       this.importLoading = false;
       this.importFileList = [];
@@ -490,7 +484,6 @@ export default {
         this.$alert(result.message, "导入成功", {
           confirmButtonText: "确定",
         });
-
         this.handletwoList();
       } else {
         this.$alert(result.message, "导入失败", {
@@ -526,10 +519,22 @@ export default {
     },
     // 提交审核
     handleAddPolicy(policyCustomers) {
-      // if (!this.conditionList.length) {
-      //      this.$errorMsg("请添加条件信息 ");
-      //      return
-      // }
+      if (!this.searchForm.title) {
+        this.$errorMsg("请输入说明");
+        return;
+      }
+      if (!this.searchForm.type) {
+        this.$errorMsg("请选择类型");
+        return;
+      }
+      if (!this.searchForm.startTime) {
+        this.$errorMsg("请选择生效日期");
+        return;
+      }
+      if (!this.searchForm.endTime) {
+        this.$errorMsg("请选择失效日期");
+        return;
+      }
       if (policyCustomers.length) {
         var arr = [];
         policyCustomers.forEach((el) => {
@@ -539,7 +544,6 @@ export default {
             customerNumber: el.number,
             lastOrderTime: "",
             limitTakeNum: 0,
-
             policyId: this.comCode,
             policyTitle: "",
             remark: "",
@@ -558,24 +562,26 @@ export default {
           examineRemark: "",
           examineStatus: "",
           id: "",
-          imgSrc: this.fileList.length ? this.fileList[0].url : "",
           policyCustomers: arr,
           remark: "",
           status: true,
           title: "",
           type: "",
           ...this.searchForm,
+          imgSrc: this.fileList[0].url || "",
         };
+        console.log(this.fileList);
         addPoliy(params).then((res) => {
           console.log(res);
           this.$successMsg("新增成功");
-          this.fileList = [];
+
           this.$parent.getList();
           this.$parent.isShow = 1;
         });
         return;
+      } else {
+        this.$errorMsg("选择经销商 ");
       }
-      this.$errorMsg("选择经销商 ");
     },
     //删除
     hanleDelete(id) {

+ 2 - 1
src/views/sales_policy/components/EditCondition.vue

@@ -19,6 +19,8 @@
             v-for="(item, index) in conditionBox"
             :key="index"
           >
+            <h5 v-if="index == 0">限定机型</h5>
+            <h5 v-if="index > 0">配提机型</h5>
             <el-row>
               <el-row class="pdt">
                 <el-button
@@ -649,7 +651,6 @@ export default {
                   this.conditionBox[index][i].policyMaterialId ==
                   res.data.records[j].id
                 ) {
-
                   res.data.records[j].disabled = true;
                 }
               }

+ 177 - 110
src/views/sales_policy/components/Examine.vue

@@ -78,6 +78,27 @@
               <div class="value">{{ detail.endTime }}</div>
             </el-col>
           </el-row>
+          <el-row class="img-box" v-if="detail.imgSrc && $parent.isShow !== 5">
+            <el-col :span="8" class="item">
+              <div class="label" style="height: 150px">政策封面图</div>
+              <div class="value" style="height: 150px">
+                <el-image
+                  style="height: 120px; widht: 120px"
+                  :src="$imageUrl + detail.imgSrc"
+                  fit="fill"
+                  :preview-src-list="srcList"
+                ></el-image>
+              </div>
+            </el-col>
+          </el-row>
+          <el-row v-if="$parent.isShow == 5">
+            <el-col :span="8" class="item">
+              <div class="label" style="height: 150px">政策封面图</div>
+              <div class="value" style="height: 150px">
+                <ImageUpload :fileList="fileList" :multiple="false" />
+              </div>
+            </el-col>
+          </el-row>
           <el-row v-if="this.$parent.isShow == 4">
             <el-col :span="8" class="item">
               <div class="label">审核人</div>
@@ -162,7 +183,7 @@
             <el-table-column
               prop="saleTypeCode"
               label="销售类型编码"
-              width="500"
+
               align="center"
             >
             </el-table-column>
@@ -185,7 +206,7 @@
                 >
               </template>
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               label="操作"
               align="center"
               width="150"
@@ -208,18 +229,18 @@
                   >
                 </el-popconfirm>
               </template>
-            </el-table-column>
+            </el-table-column> -->
           </el-table>
           <!-- 分页 -->
           <div style="margin: 20px 0">
             <el-pagination
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="currentPage"
+              @size-change="handleSizeChange2"
+              @current-change="handleCurrentChange2"
+              :current-page="dcurrentPage"
               :page-sizes="[10, 20, 30, 50]"
               :page-size="10"
               layout="total, sizes, prev, pager, next, jumper"
-              :total="listTotal"
+              :total="dlistTotal"
             >
             </el-pagination>
           </div>
@@ -343,7 +364,7 @@
                 :page-sizes="[10, 20, 30, 50]"
                 :page-size="10"
                 layout="total, sizes, prev, pager, next, jumper"
-                :total="clistTotal"
+                :total="clistTotals"
               >
               </el-pagination>
             </div>
@@ -361,11 +382,12 @@
                   :data="dataL"
                   element-loading-text="Loading"
                   border
+                  ref="multipleTable"
+                  height="480px"
                   fit
                   highlight-current-row
-                  stripe
-                    @select-all="handleSelectionAllChange"
-                        @selection-change="handleSelectionChange"
+                  @select-all="handleSelectionAllChange"
+                  @selection-change="handleSelectionChange"
                 >
                   <el-table-column
                     type="selection"
@@ -402,39 +424,38 @@
                 </div>
               </el-col>
               <el-col :span="4" class="middle_box" :offset="0">
-
-               <el-col>
-              <el-button
-                size="small"
-                @click="handleAllAdd"
-                :disabled="type == 2 "
-                >全部添加</el-button
-              ></el-col
-            >
-            <el-col>
-              <el-button
-                size="small"
-                @click="handleAdd"
-                :disabled="type == 2 "
-                >增加</el-button
-              ></el-col
-            >
-            <el-col>
-              <el-button
-                size="small"
-                :disabled="type == 1 "
-                @click="handleDelete"
-                >删除</el-button
-              ></el-col
-            >
-            <el-col>
-              <el-button
-                size="small"
-                :disabled="type == 1 "
-                @click="handleAllDelete"
-                >全部删除</el-button
-              ></el-col
-            >
+                <el-col>
+                  <el-button
+                    size="small"
+                    @click="handleAllAdd"
+                    :disabled="type == 2"
+                    >全部添加</el-button
+                  ></el-col
+                >
+                <el-col>
+                  <el-button
+                    size="small"
+                    @click="handleAdd"
+                    :disabled="type == 2"
+                    >增加</el-button
+                  ></el-col
+                >
+                <el-col>
+                  <el-button
+                    size="small"
+                    :disabled="type == 1"
+                    @click="handleDelete"
+                    >删除</el-button
+                  ></el-col
+                >
+                <el-col>
+                  <el-button
+                    size="small"
+                    :disabled="type == 1"
+                    @click="handleAllDelete"
+                    >全部删除</el-button
+                  ></el-col
+                >
               </el-col>
               <el-col :span="10" :offset="0">
                 <h5>已选经销商</h5>
@@ -448,11 +469,12 @@
                   :data="custoList"
                   element-loading-text="Loading"
                   border
+                  height="480px"
                   fit
                   highlight-current-row
                   stripe
-                    @select-all="handleSelectionAllChange2"
-                        @selection-change="handleSelectionChange2"
+                  @select-all="handleSelectionAllChange2"
+                  @selection-change="handleSelectionChange2"
                 >
                   <el-table-column type="selection" width="55" align="center">
                   </el-table-column>
@@ -521,7 +543,13 @@
           </div>
         </div>
         <div>
-          <el-button type="primary" size="default" @click="handleSave">保存</el-button>
+          <el-button
+            type="primary"
+            v-if="$parent.isShow == 5"
+            size="default"
+            @click="handleSave"
+            >保存</el-button
+          >
         </div>
       </div>
     </div>
@@ -540,9 +568,10 @@ import {
   getCrList,
   toExamine,
   addPoliy,
-  updatePolicy
+  updatePolicy,
 } from "@/api/policy_list";
 import EditCondition from "./EditCondition";
+import ImageUpload from "@/components/Common/image-upload.vue";
 
 import { handleImport } from "@/utils/util";
 
@@ -553,10 +582,14 @@ export default {
   name: "examine",
   components: {
     EditCondition,
+    ImageUpload,
   },
   data() {
     return {
       baseURL: "",
+      dcurrentPage:1,
+      dpageSize:10,
+      dlistTotal:0,
       currentPages: 1, // 当前页码
       pageSizes: 10, // 每页数量
       clistTotal: 0,
@@ -570,6 +603,8 @@ export default {
       options: {},
       value: "",
       detail: {},
+      srcList: [],
+
       screenForm: {
         code: "",
         createBy: "",
@@ -593,11 +628,11 @@ export default {
       dataL: [],
       clistTotal: 0,
       clistTotals: 0,
-      type:1,
-      fileList:[],
+      type: 1,
+      fileList: [],
       importFileList: [],
-      leftData:[],
-      rightData:[]
+      leftData: [],
+      rightData: [],
     };
   },
   created() {},
@@ -619,12 +654,19 @@ export default {
       this.listLoading = true;
       getPolicyDetail({ policyId: this.$parent.id }).then((res) => {
         this.detail = res.data;
-
+        this.srcList = [this.$imageUrl + this.detail.imgSrc];
+        if (this.$parent.isShow == 5 && this.detail.imgSrc) {
+          this.fileList = [
+            {
+              hover: "",
+              url: this.detail.imgSrc,
+            },
+           ]
+        }
         this.handletwoList();
         // 获取条件政策
         this.getConditionList();
         this.getCond();
-
       });
     },
 
@@ -638,22 +680,17 @@ export default {
       // 获取经销商列表
       getCrList(customerParams).then((res) => {
         for (let j = 0; j < this.custoList.length; j++) {
-
           for (let i = 0; i < res.data.records.length; i++) {
-
             if (res.data.records[i].id == this.custoList[j].customerId) {
-
-                 res.data.records[i].disabled = true;
+              res.data.records[i].disabled = true;
             }
-
           }
         }
-          this.dataL = res.data.records;
-        for (let k = 0; k <  this.dataL .length; k++) {
-        this.dataL[k].customerId= this.dataL[k].id,
-                this.dataL[k].customerName= this.dataL[k].name,
-                 this.dataL[k].customerNumber= this.dataL[k].number
-
+        this.dataL = res.data.records;
+        for (let k = 0; k < this.dataL.length; k++) {
+          (this.dataL[k].customerId = this.dataL[k].id),
+            (this.dataL[k].customerName = this.dataL[k].name),
+            (this.dataL[k].customerNumber = this.dataL[k].number);
         }
 
         console.log(this.dataL, "获取经销商列表");
@@ -671,6 +708,17 @@ export default {
       this.currentPages = val;
       this.getCond();
     },
+      // 更改每页数量
+    handleSizeChange2(val) {
+      this.dpageSize = val;
+      this.dcurrentPage = 1;
+     this.handletwoList()
+    },
+    // 更改当前页
+    handleCurrentChange2(val) {
+      this.dcurrentPage = val;
+      this.handletwoList()
+    },
     getCommonApi(row) {
       (this.isEdit = 2), (this.cid = row.id), (this.cpolicyId = row.policyId);
       console.log(
@@ -792,7 +840,7 @@ export default {
       // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
       // 如果没有返回值则默认返回false(全部无法选中)
     },
-       handleSelectionAllChange(e) {
+    handleSelectionAllChange(e) {
       this.leftData = e;
       this.type = 1;
     },
@@ -809,50 +857,78 @@ export default {
       this.type = 2;
     },
     handleLeft(e) {
-
       this.type = 1;
     },
     handleRight(e) {
       this.type = 2;
     },
     handleAllAdd() {
-        this.custoList = this.leftData
+      if (this.type == 1 && this.leftData.length) {
+        for (let i = 0; i < this.dataL.length; i++) {
+          for (let j = 0; j < this.leftData.length; j++) {
+            if (this.dataL[i].id == this.leftData[j].id) {
+              this.dataL[i].disabled = true;
+            }
+          }
+        }
+        this.custoList = [...this.custoList, ...this.leftData];
+        this.$refs.multipleTable.clearSelection();
+      } else {
+        this.$errorMsg("请选择要添加的经销商");
+      }
     },
     handleAllDelete() {
-        this.custoList = []
+      if (this.type == 2 && this.rightData.length) {
+        for (let i = 0; i < this.dataL.length; i++) {
+          for (let j = 0; j < this.rightData.length; j++) {
+            if (this.dataL[i].id == this.rightData[j].customerId) {
+              this.$set(this.dataL[i], "disabled", false);
+            }
+          }
+        }
+        const arr = this.resArr(this.custoList, this.rightData);
+        this.custoList = arr;
+      } else {
+        this.$errorMsg("请选择要删除的经销商");
+      }
     },
     handleAdd() {
       if (this.type == 1 && this.leftData.length) {
-            this.custoList = [...this.custoList,...this.leftData]
-      }else{
-        this.$errorMsg('请选择要添加的经销商')
+        for (let i = 0; i < this.dataL.length; i++) {
+          for (let j = 0; j < this.leftData.length; j++) {
+            if (this.dataL[i].id == this.leftData[j].id) {
+              this.dataL[i].disabled = true;
+            }
+          }
+        }
+        this.custoList = [...this.custoList, ...this.leftData];
+        this.leftData = [];
+        this.$refs.multipleTable.clearSelection();
+      } else {
+        this.$errorMsg("请选择要添加的经销商");
       }
     },
     handleDelete() {
       if (this.type == 2 && this.rightData.length) {
         for (let i = 0; i < this.dataL.length; i++) {
-
-            for (let j = 0; j < this.rightData.length; j++) {
-
-                if (this.dataL[i].id == this.rightData[j].customerId) {
-                                  this.dataL[i].disabled = false;
-
-                }
+          for (let j = 0; j < this.rightData.length; j++) {
+            if (this.dataL[i].id == this.rightData[j].customerId) {
+              this.$set(this.dataL[i], "disabled", false);
             }
-
+          }
         }
-         const arr =   this.resArr(this.custoList,this.rightData ,true)
-         this.custoList = arr
-      }else{
-        this.$errorMsg('请选择要删除的经销商')
+        const arr = this.resArr(this.custoList, this.rightData);
+        this.custoList = arr;
+      } else {
+        this.$errorMsg("请选择要删除的经销商");
       }
-  },
+    },
     //去掉相同数据
     resArr(arr1, arr2) {
       return arr1.filter((v) => arr2.every((val) => val.id != v.id));
     },
-   async  handleSave(){
-    if (this.custoList.length) {
+    async handleSave() {
+      if (this.custoList.length) {
         var arr = [];
         this.custoList.forEach((el) => {
           arr.push({
@@ -868,32 +944,18 @@ export default {
         });
 
         const params = {
-          adminCompanyId: "",
-          code: "",
-          customerCount: 0,
-          examineBy: "",
-          examineRemark: "",
-          examineStatus: "",
-          id: "",
-          imgSrc: this.fileList.length ? this.fileList[0].url : "",
-          policyCustomers: arr,
-          remark: "",
-          status: true,
-          title: "",
-          type: "",
           ...this.detail,
+          policyCustomers: arr,
+          imgSrc: this.fileList.length ? this.fileList[0].url : "",
         };
-           await  updatePolicy(params)
-           await   this.getCond();
-          this.$successMsg("编辑成功");
-          this.fileList = [];
-          this.$parent.isShow = 1;
-
+        await updatePolicy(params);
+        await this.getCond();
+        this.$successMsg("编辑成功");
+        this.fileList = [];
+        this.$parent.isShow = 1;
       }
-
-
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -940,4 +1002,9 @@ export default {
   justify-content: space-between;
   align-items: center;
 }
+.img-box {
+  height: 150px;
+  display: flex;
+  align-items: center;
+}
 </style>

+ 7 - 2
src/views/sales_policy/policy_list.vue

@@ -308,6 +308,7 @@
 
 <script>
 import {
+  getId,
   getList,
   getTypeList,
   deletePolicy,
@@ -393,8 +394,12 @@ export default {
   created() {},
   methods: {
     hanlenewInfo() {
-      this.isShow = 2;
-      this.$store.dispatch("sales/hanlenewInfo");
+      console.log();
+       getId().then(res=>{
+         this.$store.commit("sales/setId",res.data);
+          this.isShow = 2;
+      })
+
     },
     getList() {
       this.listLoading = true;

+ 12 - 10
src/views/supply/policy/components/retail_detail.vue

@@ -127,7 +127,7 @@
         <el-table-column
           align="center"
           label="数量"
-          prop="qty"
+          prop="refundableQty"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
@@ -141,17 +141,18 @@
         <el-table-column
           align="center"
           label="返利类型"
-          prop="rebateWallets"
+          prop="customerWalletName2"
           min-width="100"
           show-overflow-tooltip
         >
           <template slot-scope="scope">
+              <!-- v-for="item in scope.row.rebateWallets" -->
             <el-tag
               type="success"
               size="small"
-              v-for="item in scope.row.rebateWallets"
+
             >
-              {{ item.name }}
+                {{ scope.row.customerWalletName2 }}
             </el-tag>
           </template>
         </el-table-column>
@@ -172,17 +173,18 @@
         <el-table-column
           align="center"
           label="现金钱包"
-          prop="wallets"
+          prop="customerWalletName"
           min-width="100"
           show-overflow-tooltip
         >
           <template slot-scope="scope">
+              <!-- v-for="item in scope.row.wallets" -->
             <el-tag
               type="success"
               size="small"
-              v-for="item in scope.row.wallets"
+
             >
-              {{ item.name }}
+              {{ scope.row.customerWalletName }}
             </el-tag>
           </template>
         </el-table-column>
@@ -400,7 +402,7 @@
           <el-table-column
             align="center"
             label="订单数量"
-            prop="qty"
+            prop="refundableQty"
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
@@ -444,11 +446,11 @@
           <el-table-column
             align="center"
             label="返利"
-            prop="rebateAmount"
+            prop="payRebateAmount"
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-payAmount
+
           <el-table-column
             align="center"
             label="备注"

+ 22 - 14
src/views/supply/policy/components/retail_examine.vue

@@ -117,7 +117,7 @@
         <el-table-column
           align="center"
           label="数量"
-          prop="qty"
+          prop="refundableQty"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
@@ -131,21 +131,25 @@
         <el-table-column
           align="center"
           label="返利类型"
-          prop="rebateWallets"
+          prop="customerWalletName2"
           min-width="100"
           show-overflow-tooltip
         >
-        <template slot-scope="scope">
-          <el-tag type="success" size="small" v-for="item in scope.row.rebateWallets">
-          {{item.name}}
-          </el-tag>
+       <template slot-scope="scope">
+              <!-- v-for="item in scope.row.rebateWallets" -->
+            <el-tag
+              type="success"
+              size="small"
 
-        </template>
+            >
+                {{ scope.row.customerWalletName2 }}
+            </el-tag>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"
           label="返利金额"
-          prop="rebateAmount"
+          prop="payRebateAmount"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
@@ -159,16 +163,20 @@
         <el-table-column
           align="center"
           label="现金钱包"
-          prop="wallets"
+          prop="customerWalletName"
           min-width="100"
           show-overflow-tooltip
         >
-          <template slot-scope="scope">
-          <el-tag type="success" size="small" v-for="item in scope.row.wallets">
-          {{item.name}}
-          </el-tag>
+            <template slot-scope="scope">
+              <!-- v-for="item in scope.row.rebateWallets" -->
+            <el-tag
+              type="success"
+              size="small"
 
-        </template>
+            >
+                {{ scope.row.customerWalletName }}
+            </el-tag>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"

+ 7 - 3
src/views/supply/policy/components/retail_return.vue

@@ -211,16 +211,20 @@ export default {
 
     // 提交
     clickSubmitForm() {
+        let tip = 0
       for(let i=0; i<this.detailData.retailOrderItemList.length; i++) {
-        if(this.detailData.retailOrderItemList[i].tdQty === '' || this.detailData.retailOrderItemList[i].tdQty === null) {
-          this.$errorMsg('请填写退订数量');
-          return;
+        if(this.detailData.retailOrderItemList[i].tdQty) {
+              tip+=1
         }
         if(Number(this.detailData.retailOrderItemList[i].tdQty) < 0) {
           this.$errorMsg('退订数量不可为负数');
           return;
         }
       }
+      if (tip == 0) {
+          this.$errorMsg('请填写退订数量');
+          return
+      }
 
       this.formLoading = true;
       returnData({

+ 43 - 6
src/views/supply/policy/policy_list.vue

@@ -64,15 +64,15 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="订单日期" prop="date">
-                <el-date-picker
+                <!-- <el-date-picker
                   v-model="screenForm.date"
                   class="dateStyle"
                   type="datetime"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   placeholder="选择订单日期"
                 >
-                </el-date-picker>
-                <!-- <el-date-picker
+                </el-date-picker> -->
+                <el-date-picker
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
@@ -81,7 +81,7 @@
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"
                 >
-                </el-date-picker> -->
+                </el-date-picker>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -162,11 +162,19 @@
               align="center"
               label="订单日期"
               prop="theTime"
-              min-width="100"
+              min-width="150"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.theTime | dateToDayFilter }}
+                <div>
+                  <span>{{ scope.row.theTime | dateToDayFilter }}</span>
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 6px"
+                    @click="editDate(scope.row)"
+                  ></el-button>
+                </div>
               </template>
             </el-table-column>
             <el-table-column
@@ -453,12 +461,17 @@
       v-if="isShowReturn"
       @backListFormDetail="backList"
     />
+    <EditDateDialog
+      :isShow.sync="isShowEditDateDialog"
+      :dateForm.sync="dateForm"
+    />
   </div>
 </template>
 
 <script>
 import {
   getList,
+  editData,
   closeData,
   submitData,
   submitCancel,
@@ -467,6 +480,7 @@ import RetailDetail from "./components/retail_detail";
 import RetailForm from "./components/retail_form2";
 import RetailExamine from "./components/retail_examine";
 import RetailReturn from "./components/retail_return";
+import EditDateDialog from "@/components/Common/edit-date-dialog";
 
 let that;
 export default {
@@ -475,6 +489,7 @@ export default {
     RetailForm,
     RetailExamine,
     RetailReturn,
+    EditDateDialog,
   },
   filters: {
     statusFilter(val) {
@@ -511,6 +526,10 @@ export default {
       isShowForm: false,
       isShowExamine: false,
       isShowReturn: false,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: "",
+      },
     };
   },
   computed: {
@@ -654,6 +673,24 @@ export default {
         this.getList();
       });
     },
+    // 打开 修改订单日期
+    editDate(item) {
+      this.editId = item.id;
+      this.dateForm.date = item.theTime.slice(0, 10);
+      this.isShowEditDateDialog = true;
+    },
+
+    // 提交 修改订单日期
+    submitDateForm() {
+      editData({
+        id: this.editId,
+        theTime: this.dateForm.date + " 00:00:00",
+      }).then((res) => {
+        this.isShowEditDateDialog = false;
+        this.getList();
+        this.$successMsg("修改成功");
+      });
+    },
   },
 };
 </script>

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

@@ -56,7 +56,7 @@
                 <el-input v-model="screenForm.shMan" placeholder="请输入审核人"></el-input>
               </el-form-item>
             </el-col>
-            
+
             <el-col :xs="24" :sm="12" :lg="6" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
@@ -162,7 +162,7 @@
     </div>
 
     <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
-    
+
     <RetailDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <RetailForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
     <RetailExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />