Prechádzať zdrojové kódy

Merge branch 'feature/Feature-supply' into develop

莫绍宝 3 rokov pred
rodič
commit
83d5ca0499

+ 66 - 0
src/components/Common/edit-date-dialog.vue

@@ -0,0 +1,66 @@
+<template>
+  <div>
+    <el-dialog title="修改订单日期" :visible.sync="isShow" :show-close="false" width="400px" :close-on-click-modal="false">
+      <el-form ref="dateForm" :model="dateForm" :rules="dateFormRules" label-position="left" label-width="80px">
+        <el-form-item label="选择日期" prop="date">
+          <el-date-picker
+            v-model="dateForm.date"
+            type="date"
+            value-format="yyyy-MM-dd"
+            style="width: 100%;"
+            placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelDateForm">取 消</el-button>
+        <el-button type="primary" @click="submitDateForm">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'EditDateDialog',
+  props: {
+    isShow: {
+      type: Boolean,
+      default: false
+    },
+    dateForm: {
+      type: Object,
+      default: {
+        date: '',
+      }
+    }
+  },
+  data() {
+    return {
+      dateFormRules: {
+        date: [
+          { required: true, message: '请选择订单日期', trigger: 'change' }
+        ],
+      },
+    }
+  },
+  methods: {
+    cancelDateForm() {
+      this.$emit('update:isShow', false);
+    },
+
+    submitDateForm() {
+      this.$refs.dateForm.validate((valid) => {
+        if (valid) {
+          this.$parent.submitDateForm();
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 3 - 3
src/views/setting/role.vue

@@ -328,8 +328,8 @@ export default {
 }
 </script>
 
-<style lang="scss">
-  .tree-dialog {
+<style lang="scss" scoped>
+  ::v-deep .tree-dialog {
     .el-dialog__body {
       padding: 20px;
       .el-tree {
@@ -345,7 +345,7 @@ export default {
       }
     }
   }
-  .custom-tree-node {
+  ::v-deep .custom-tree-node {
     flex: 1;
     display: flex;
     align-items: center;

+ 39 - 4
src/views/supply/engin/commerce_list.vue

@@ -91,9 +91,16 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <div>
+                  <span>{{scope.row.orderDate | dateToDayFilter}}</span>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" ></el-button>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="工程编码" prop="refProjectNo" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{scope.row.enginOrderType | typeFilter}}
@@ -101,7 +108,7 @@
             </el-table-column>
             <el-table-column align="center" label="使用单位" prop="refUseUnit" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="货品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <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>
@@ -156,6 +163,8 @@
         </div>
       </div>
     </div>
+
+    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
     
     <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
@@ -166,11 +175,12 @@
 </template>
 
 <script>
-import { getOrderList, applyCom, withdrawCom, deleteCom } from "@/api/supply/engin";
+import { getOrderList, applyCom, withdrawCom, deleteCom, editCom } 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";
 import CommerceReturn from "@/views/supply/engin/components/commerce_return";
+import EditDateDialog from "@/components/Common/edit-date-dialog";
 
 let that
 export default {
@@ -179,6 +189,7 @@ export default {
     CommerceForm,
     CommerceExamine,
     CommerceReturn,
+    EditDateDialog,
   },
   filters: {
     statusFilter(val) {
@@ -226,6 +237,12 @@ export default {
       isShowForm: false,
       isShowExamine: false,
       isShowReturn: false,
+
+      editId: null,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: '',
+      },
     }
   },
 
@@ -394,6 +411,24 @@ export default {
       this.multipleSelection = val;
     },
 
+    // 打开 修改订单日期
+    editDate(item) {
+      this.editId = item.parentId;
+      this.dateForm.date = item.orderDate.slice(0, 10);
+      this.isShowEditDateDialog = true;
+    },
+
+    // 提交 修改订单日期
+    submitDateForm() {
+      editCom({
+        enginOrderId: this.editId,
+        orderDate: this.dateForm.date + ' 00:00:00',
+      }).then(res => {
+        this.isShowEditDateDialog = false;
+        this.getList();
+        this.$successMsg('修改成功');
+      })
+    },
 
   }
 }

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

@@ -17,10 +17,11 @@
           <el-form-item label="单据日期" prop="orderDate">
             <el-date-picker
               v-model="mainForm.orderDate"
+              disabled
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="选择日期">
+              placeholder="系统自动生成">
             </el-date-picker>
           </el-form-item>
         </el-col>
@@ -361,7 +362,7 @@ export default {
         fileNum: '',
       },
       mainFormRules: {
-        orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
+        // orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
         jxsNum: [{ required: true, message: '请输入经销商编码', trigger: 'blur' }],
         jxsName: [{ required: true, message: '请输入经销商名称', trigger: 'blur' }],
         enginNum: [{ required: true, message: '请输入工程登录编号', trigger: 'blur' }],
@@ -678,7 +679,7 @@ export default {
 
           let params = {
             enginOrderId: this.mainForm.orderNum,
-            orderDate: this.mainForm.orderDate,
+            // orderDate: this.mainForm.orderDate,
             mainId: this.mainForm.type || '',
             refEnginRecordNo: this.mainForm.enginNum || '',
             refFactoryNo: this.mainForm.factoryNum || '',

+ 5 - 4
src/views/supply/engin/components/engin_form.vue

@@ -6,7 +6,7 @@
       <div class="title">工程信息单</div>
     </div>
 
-    <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="100px" size="small" label-position="left">
+    <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="100px" size="small" label-position="right">
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="工程信息单" prop="orderNum">
@@ -17,10 +17,11 @@
           <el-form-item label="单据日期" prop="orderDate">
             <el-date-picker
               v-model="mainForm.orderDate"
+              disabled
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="选择日期">
+              placeholder="系统自动生成">
             </el-date-picker>
           </el-form-item>
         </el-col>
@@ -239,7 +240,7 @@ export default {
         contractDate: '',
       },
       mainFormRules: {
-        orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
+        // orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
         jxsNum: [{ required: true, message: '请输入经销商编码', trigger: 'blur' }],
         enginName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
         jxsName: [{ required: true, message: '请输入经销商名称', trigger: 'blur' }],
@@ -415,7 +416,7 @@ export default {
           }
 
           let params = {
-            orderDate: this.mainForm.orderDate + ' 00:00:00',
+            // orderDate: this.mainForm.orderDate + ' 00:00:00',
             mainId: this.mainForm.mainId,
             projectName: this.mainForm.enginName,
             orderType: this.mainForm.orderType,

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

@@ -17,10 +17,11 @@
           <el-form-item label="单据日期" prop="orderDate">
             <el-date-picker
               v-model="mainForm.orderDate"
+              disabled
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="选择日期">
+              placeholder="系统自动生成">
             </el-date-picker>
           </el-form-item>
         </el-col>
@@ -369,7 +370,7 @@ export default {
         loginUserId: ''
       },
       mainFormRules: {
-        orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
+        // orderDate: [{ required: true, message: '请选择单据日期', trigger: 'change' }],
         jxsNum: [{ required: true, message: '请输入经销商编码', trigger: 'blur' }],
         jxsName: [{ required: true, message: '请输入经销商名称', trigger: 'blur' }],
         loginNum: [{ required: true, message: '请输入工程登录编号', trigger: 'blur' }],
@@ -712,7 +713,7 @@ export default {
           let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
           let params = {
             enginOrderId: this.mainForm.orderNum,
-            orderDate: this.mainForm.orderDate,
+            // orderDate: this.mainForm.orderDate,
             mainId: this.mainForm.type || '',
             loginUserId: this.mainForm.loginUserId,
             refEnginRecordNo: this.mainForm.loginNum || '',

+ 39 - 3
src/views/supply/engin/engin_list.vue

@@ -89,7 +89,14 @@
         <div class="table">
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
             <el-table-column align="center" label="工程信息单" prop="enginInfoNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="单据日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <div>
+                  <span>{{scope.row.orderDate | dateToDayFilter}}</span>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" ></el-button>
+                </div>
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="经销商编码" prop="customerId" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程名称" prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
@@ -142,6 +149,8 @@
         </div>
       </div>
     </div>
+    
+    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
 
     <EnginDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <EnginForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
@@ -151,10 +160,11 @@
 </template>
 
 <script>
-import { getEnginList, applyEngin, withdrawEngin, deleteEngin } from "@/api/supply/engin";
+import { getEnginList, applyEngin, withdrawEngin, deleteEngin, editEngin } from "@/api/supply/engin";
 import EnginDetail from "@/views/supply/engin/components/engin_detail";
 import EnginForm from "@/views/supply/engin/components/engin_form";
 import EnginExamine from "@/views/supply/engin/components/engin_examine";
+import EditDateDialog from "@/components/Common/edit-date-dialog";
 
 let that
 export default {
@@ -162,6 +172,7 @@ export default {
     EnginDetail,
     EnginForm,
     EnginExamine,
+    EditDateDialog,
   },
   filters: {
     statusFilter(val) {
@@ -200,6 +211,12 @@ export default {
       isShowDetail: false,
       isShowForm: false,
       isShowExamine: false,
+
+      editId: null,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: '',
+      },
     }
   },
 
@@ -329,7 +346,26 @@ export default {
         this.$successMsg();
         this.getList();
       })
-    }
+    },
+
+    // 打开 修改订单日期
+    editDate(item) {
+      this.editId = item.enginInfoId;
+      this.dateForm.date = item.orderDate.slice(0, 10);
+      this.isShowEditDateDialog = true;
+    },
+
+    // 提交 修改订单日期
+    submitDateForm() {
+      editEngin({
+        enginInfoId: this.editId,
+        orderDate: this.dateForm.date + ' 00:00:00',
+      }).then(res => {
+        this.isShowEditDateDialog = false;
+        this.getList();
+        this.$successMsg('修改成功');
+      })
+    },
   }
 }
 </script>

+ 39 - 4
src/views/supply/engin/home_list.vue

@@ -91,8 +91,15 @@
               </template>
             </el-table-column>
             <el-table-column align="center" label="工程订单号" prop="enginOrderNo" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程编码" prop="refProjectNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <div>
+                  <span>{{scope.row.orderDate | dateToDayFilter}}</span>
+                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" ></el-button>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="工程编码" prop="refProjectNo" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程登录单号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单类型" prop="enginOrderType" min-width="160" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -101,7 +108,7 @@
             </el-table-column>
             <el-table-column align="center" label="使用单位" prop="refUseUnit" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="货品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <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>
@@ -156,6 +163,8 @@
         </div>
       </div>
     </div>
+
+    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
     
     <HomeDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <HomeForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
@@ -166,11 +175,12 @@
 </template>
 
 <script>
-import { getOrderList, applyHome, withdrawHome, deleteHome } from "@/api/supply/engin";
+import { getOrderList, applyHome, withdrawHome, deleteHome, editHome } 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";
 import HomeReturn from "@/views/supply/engin/components/home_return";
+import EditDateDialog from "@/components/Common/edit-date-dialog";
 
 let that
 export default {
@@ -179,6 +189,7 @@ export default {
     HomeForm,
     HomeExamine,
     HomeReturn,
+    EditDateDialog,
   },
   filters: {
     statusFilter(val) {
@@ -226,6 +237,12 @@ export default {
       isShowForm: false,
       isShowExamine: false,
       isShowReturn: false,
+
+      editId: null,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: '',
+      },
     }
   },
 
@@ -387,7 +404,25 @@ export default {
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    
+    // 打开 修改订单日期
+    editDate(item) {
+      this.editId = item.parentId;
+      this.dateForm.date = item.orderDate.slice(0, 10);
+      this.isShowEditDateDialog = true;
+    },
 
+    // 提交 修改订单日期
+    submitDateForm() {
+      editHome({
+        enginOrderId: this.editId,
+        orderDate: this.dateForm.date + ' 00:00:00',
+      }).then(res => {
+        this.isShowEditDateDialog = false;
+        this.getList();
+        this.$successMsg('修改成功');
+      })
+    },
 
   }
 }

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

@@ -21,7 +21,7 @@
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">订单日期</div>
-          <div class="value">{{detailData.theTime}}</div>
+          <div class="value">{{detailData.theTime | dateToDayFilter}}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据状态</div>

+ 10 - 9
src/views/supply/retail/components/retail_form.vue

@@ -10,17 +10,18 @@
       <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="订单号" prop="orderNum">
-            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" readonly></el-input>
+            <el-input v-model="mainForm.orderNum" placeholder="系统自动生成" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
           <el-form-item label="单据日期" prop="date">
             <el-date-picker
               v-model="mainForm.date"
+              disabled
               type="date"
               value-format="yyyy-MM-dd"
               style="width: 100%;"
-              placeholder="选择日期">
+              placeholder="系统自动生成">
             </el-date-picker>
           </el-form-item>
         </el-col>
@@ -33,12 +34,12 @@
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
-            <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" readonly></el-input>
+            <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="16">
           <el-form-item label="经销商名称" prop="jxsName">
-            <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称" readonly></el-input>
+            <el-input v-model="mainForm.jxsName" placeholder="请输入经销商名称" disabled></el-input>
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
@@ -291,9 +292,9 @@ export default {
         remark: '',
       },
       mainFormRules: {
-        date: [
-          { required: true, message: '请选择单据日期', trigger: 'change' }
-        ],
+        // date: [
+        //   { required: true, message: '请选择单据日期', trigger: 'change' }
+        // ],
         type: [
           { required: true, message: '请选择品类', trigger: 'change' }
         ],
@@ -364,7 +365,7 @@ export default {
       getDetail({id: this.listItem.id}).then(res => {
         let data = res.data;
         this.mainForm.orderNum = data.id;
-        this.mainForm.date = data.theTime;
+        this.mainForm.date = data.theTime.slice(0, 10);
         this.mainForm.type = data.mainId;
         this.mainForm.jxsNum = data.customerId;
         this.mainForm.jxsName = data.customerName;
@@ -624,7 +625,7 @@ export default {
 
           let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
           let params = {
-            theTime: this.mainForm.date + ' 00:00:00',
+            // theTime: this.mainForm.date + ' 00:00:00',
             mainId: this.mainForm.type,
             mainName,
             remark: this.mainForm.remark,

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

@@ -93,10 +93,13 @@
                 {{scope.row.isInvoicing ? '已开票':'未开票'}}
               </template>
             </el-table-column>
-            <el-table-column align="center" label="订单号" prop="id" min-width="180" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="订单日期" prop="theTime" min-width="100" show-overflow-tooltip>
+            <el-table-column align="center" label="订单号" prop="id" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="theTime" min-width="120" 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 align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
@@ -126,7 +129,7 @@
             <el-table-column align="center" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="审核人" prop="examineName" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="审核日期" prop="examineTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="操作" width="220" fixed="right">
+            <el-table-column align="center" label="操作" width="180" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">编辑</el-button>
                 <el-button type="text" @click="toExamine(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">审批</el-button>
@@ -157,6 +160,8 @@
         </div>
       </div>
     </div>
+
+    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
     
     <RetailDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <RetailForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
@@ -167,11 +172,12 @@
 </template>
 
 <script>
-import { getList, closeData, submitData } from "@/api/supply/retail";
+import { getList, closeData, submitData, editData } from "@/api/supply/retail";
 import RetailDetail from "@/views/supply/retail/components/retail_detail";
 import RetailForm from "@/views/supply/retail/components/retail_form";
 import RetailExamine from "@/views/supply/retail/components/retail_examine";
 import RetailReturn from "@/views/supply/retail/components/retail_return";
+import EditDateDialog from "@/components/Common/edit-date-dialog";
 
 let that
 export default {
@@ -180,6 +186,7 @@ export default {
     RetailForm,
     RetailExamine,
     RetailReturn,
+    EditDateDialog,
   },
   filters: {
     statusFilter(val) {
@@ -216,6 +223,12 @@ export default {
       isShowForm: false,
       isShowExamine: false,
       isShowReturn: false,
+
+      editId: null,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: '',
+      },
     }
   },
 
@@ -346,6 +359,25 @@ 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>