Parcourir la source

整理 api/supply/policy.js

howie il y a 3 ans
Parent
commit
cf35e6d62b

+ 194 - 0
src/api/supply/policy.js

@@ -0,0 +1,194 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/retail/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/retail/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 关闭
+export function closeData(params) {
+  return request({
+    url: '/retail/close',
+    method: 'post',
+    params
+  })
+}
+
+// 审批
+export function examineData(params) {
+  return request({
+    url: '/retail/examine',
+    method: 'post',
+    params
+  })
+}
+
+// 退订
+export function returnData(params) {
+  return request({
+    url: '/retail/return',
+    method: 'post',
+    params
+  })
+}
+
+// 提交审核
+export function submitData(params) {
+  return request({
+    url: '/retail/submit',
+    method: 'post',
+    params
+  })
+}
+
+// 新增
+export function addData(params) {
+  return request({
+    url: '/retail/add',
+    method: 'post',
+    data: params
+  })
+}
+
+// 编辑
+export function editData(params) {
+  return request({
+    url: '/retail/update',
+    method: 'post',
+    data: params
+  })
+}
+
+// 获取销售类型列表
+export function getSalesTypeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取产品列表
+export function getGoodsList(params) {
+  return request({
+    url: '/retail/product/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取钱包列表
+export function getWalletList(params) {
+  return request({
+    url: '/wallet/customer/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取仓库列表
+export function getWarehouseList(params) {
+  return request({
+    url: '/stock/listStock',
+    method: 'get',
+    params
+  })
+}
+
+// 检查库存
+export function checkStock(params) {
+  return request({
+    url: '/stock/manager/stockStatus',
+    method: 'get',
+    params
+  })
+}
+
+
+export function submitCancel(params) {
+  return request({
+    url: '/retail/submit/cancel',
+    method: 'post',
+    params
+  })
+}
+// 销售类型
+export function typeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+
+
+// 销售政策
+export function policyList(params) {
+  return request({
+    url: '/policy/list',
+    method: 'get',
+    params
+  })
+}
+
+// 根据政策id和物料id反查政策条件
+export function getpolicyList(params) {
+  return request({
+    url: '/policy/condition/get',
+    method: 'get',
+    params
+  })
+}
+
+//政策条件的机型列表
+export function getConditionList(params) {
+  return request({
+    url: '/policy/condition/material/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+export function getpolicyTypeList(params) {
+  return request({
+    url: '/policy/type1/material/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+export function getMaterialTypeList(params) {
+  return request({
+    url: '/policy/material/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+
+export function getConditionDetail(params) {
+  return request({
+    url: '/policy/condition/detail',
+    method: 'get',
+    params
+  })
+}

+ 0 - 74
src/api/supply/retail.js

@@ -118,78 +118,4 @@ export function checkStock(params) {
 }
 
 
-export function submitCancel(params) {
-  return request({
-    url: '/retail/submit/cancel',
-    method: 'post',
-    params
-  })
-}
-// 销售类型
-export function typeList(params) {
-  return request({
-    url: '/sale/type/list',
-    method: 'get',
-    params
-  })
-}
-
-
-
-// 销售政策
-export function policyList(params) {
-  return request({
-    url: '/policy/list',
-    method: 'get',
-    params
-  })
-}
-
-// 根据政策id和物料id反查政策条件
-export function getpolicyList(params) {
-  return request({
-    url: '/policy/condition/get',
-    method: 'get',
-    params
-  })
-}
 
-//政策条件的机型列表
-export function getConditionList(params) {
-  return request({
-    url: '/policy/condition/material/list',
-    method: 'get',
-    params
-  })
-}
-
-
-
-export function getpolicyTypeList(params) {
-  return request({
-    url: '/policy/type1/material/list',
-    method: 'get',
-    params
-  })
-}
-
-
-
-export function getMaterialTypeList(params) {
-  return request({
-    url: '/policy/material/list',
-    method: 'get',
-    params
-  })
-}
-
-
-
-
-export function getConditionDetail(params) {
-  return request({
-    url: '/policy/condition/detail',
-    method: 'get',
-    params
-  })
-}

+ 2 - 9
src/views/sales_policy/components/AddCondition.vue

@@ -1,9 +1,7 @@
 <template>
   <el-container>
     <el-header height="50px" class="header">
-
       <el-page-header @back="handleBack" content="详情页面">
-
       </el-page-header>
     </el-header>
     <div class="line">
@@ -427,9 +425,6 @@ export default {
   },
   created() {
     this.getCommonApi();
-
-    console.log(this.$parent.codeId, "codeid");
-
   },
    computed: mapState({
     comCode: (state) => state.sales.code,
@@ -445,7 +440,7 @@ export default {
       if (this.$parent.isShow==10) {
           this.$parent.isShow = 8
       }else{
-        this.$parent.isShow =2
+        this.$parent.isCondition =0
       }
 
     },
@@ -478,8 +473,6 @@ export default {
       this.conditionBox.push([{}]);
     },
     handleSubmit() {
-
-      console.log(this.comCode);
       var tableData = [];
       for (let i = 0; i < this.conditionBox.length; i++) {
         for (let j = 0; j < this.conditionBox[i].length; j++) {
@@ -509,7 +502,7 @@ export default {
       };
       addPoliyCondition(params).then((res) => {
         this.$successMsg("添加成功");
-        this.$parent.isShow = 2
+        this.$parent.isCondition = 0
         this.$parent.isFlag = 1
         this.$emit('handleSubmitCon',this.comCode)
       });

+ 28 - 22
src/views/sales_policy/components/AddPolicy.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div>
+    <div v-show="isCondition==0">
     <el-header height="50px" class="header">
       <el-page-header
         @back="($parent.isShow = 1), ($parent.isFlag = '')"
@@ -171,7 +171,7 @@
           </el-table-column>
           <el-table-column label="支付钱包" align="center">
             <template slot-scope="scope">
-                <el-tag style="margin:10px" type="success" size="small" v-for=" item  in  scope.row.walletRelaList">{{item.walletName}}</el-tag>
+                <el-tag style="margin:5px" type="success" size="small" v-for=" item  in  scope.row.walletRelaList">{{item.walletName}}</el-tag>
             </template>
           </el-table-column>
           <el-table-column fixed="right" label="操作" align="center">
@@ -214,7 +214,7 @@
               <h4 style="display: inline-block; margin-right: 20px">
                 条件信息
               </h4>
-              <el-button size="small" @click="$parent.isShow = 3"
+              <el-button size="small" @click="isCondition=1"
                 >添加</el-button
               ></el-col
             >
@@ -269,7 +269,7 @@
       </div>
     </div>
   </div>
-  <AddCondition  />
+  <AddCondition v-show="isCondition==1"  @handleSubmitCon="handleSubmitCon"/>
   </div>
 </template>
 
@@ -287,7 +287,7 @@ import {
 } from "@/api/supply/sales";
 import { downloadFiles, handleImport } from "@/utils/util";
 import Transfer from "./Transfer";
-import Pagination from "@/components/Pagination";
+import AddCondition from "./AddCondition";
 import ImageUpload from "@/components/Common/image-upload.vue";
 
 export default {
@@ -296,6 +296,7 @@ export default {
     return {
       input: "",
       baseURL: "",
+      isCondition:0,
       searchForm: {
         code: "",
         endTime: "",
@@ -335,31 +336,27 @@ export default {
     comCode: (state) => {
       return state.sales.code;
     },
-    newForm:(state) => {
-      return state.sales.searchForm;
-    },
-    imgFile:(state) => {
-      return state.sales.fileList;
-    },
+    // newForm:(state) => {
+    //   return state.sales.searchForm;
+    // },
+    // imgFile:(state) => {
+    //   return state.sales.fileList;
+    // },
   }),
+  beforeUpdate() {
+    this.searchForm.code = this.comCode
+  },
   created() {
+
     this.getCommonApi();
     if (this.$parent.isFlag) {
-      const params = {
-        policyId: this.comCode,
-      };
-      // 获取条件政策
-      getConditionList(params).then((res) => {
-        this.conditionList = res.data;
 
-      });
       // this.handletwoList()
     }
   },
+
   updated() {
-    this.searchForm = this.newForm
-    this.searchForm.code = this.comCode;
-    this.fileList = this.imgFile
+
   },
   methods: {
     ...mapMutations('sales',['initData']),
@@ -400,6 +397,15 @@ export default {
         this.walletList = res.data.records;
       });
     },
+     handleSubmitCon(){
+       const params = {
+        policyId: this.comCode,
+      };
+      // 获取条件政策
+      getConditionList(params).then((res) => {
+        this.conditionList = res.data;
+      });
+  },
     // 导入
     async handleImport(param) {
       this.importLoading = true;
@@ -510,7 +516,7 @@ export default {
   },
   components: {
     Transfer,
-    Pagination,
+    AddCondition,
     ImageUpload,
   },
 };

+ 17 - 41
src/views/sales_policy/components/Examine.vue

@@ -111,41 +111,8 @@
           </el-table-column>
           <el-table-column label="支付钱包" align="center">
             <template slot-scope="scope">
-              <el-tag
-                type="danger"
-                size="small"
-                v-if="scope.row.walletCommonly == 1"
-              >
-                允许普通钱包
-              </el-tag>
-              <el-tag type="danger" size="small" v-else
-                >不允许使用普通钱包</el-tag
-              >
-              <el-tag
-                type="danger"
-                size="small"
-                v-if="scope.row.walletDeduct == 1"
-              >
-                允许抵扣钱包</el-tag
-              >
-              <el-tag type="danger" size="small" v-else>不允许抵扣钱包</el-tag>
-              <el-tag
-                type="danger"
-                size="small"
-                v-if="scope.row.walletRebate == 1"
-              >
-                允许返利钱包
-              </el-tag>
-              <el-tag type="danger" size="small" v-else>不允许返利钱包</el-tag>
-              <el-tag
-                type="danger"
-                size="small"
-                v-if="scope.row.walletSpecial == 1"
-                >允许特殊钱包</el-tag
-              >
-              <el-tag type="danger" size="small" v-else>
-                不允许特殊钱包
-              </el-tag>
+                               <el-tag style="margin:5px" type="success" size="small" v-for=" item  in  scope.row.walletRelaList">{{item.walletName}}</el-tag>
+
             </template>
           </el-table-column>
         </el-table>
@@ -190,6 +157,9 @@
           >
           </el-table-column>
           <el-table-column prop="name" label="限定条件" align="center">
+            <template slot-scope="scope">
+              限定条件{{scope.$index+1}}
+            </template>
           </el-table-column>
 
         </el-table>
@@ -247,10 +217,10 @@
           >
           </el-pagination>
         </div>
-        <div class="descriptions" v-if="$parent.isShow == 8 ">
+        <div class="descriptions" v-if="$parent.isShow == 8  && detail.examineStatus == 'SAVE'">
           <el-row>
             <el-col :span="6">审核人</el-col>
-            <el-col :span="6">{{ detail.code }}</el-col>
+            <el-col :span="6">{{$store.getters.name}}</el-col>
             <el-col :span="6">审核结果</el-col>
             <el-col :span="6">
               <template>
@@ -265,9 +235,9 @@
             <el-col :span="4">审批说明</el-col>
             <el-col :span="20" class="col" style="padding: 0">
               <el-input
-                type="textarea"
-                style="height: 100%"
-                autosize
+
+                  size="small"
+
                 placeholder="请输入内容"
                 v-model="remark"
               >
@@ -333,7 +303,9 @@ export default {
       custoList: [],
     };
   },
-  created() {},
+  created() {
+
+  },
   methods: {
     getList() {
       this.listLoading = true;
@@ -426,4 +398,8 @@ export default {
 .col {
   height: 100px;
 }
+.el-input.is-active .el-input__inner, .el-input__inner:focus {
+    border-color: #fff;
+    outline: 0;
+}
 </style>

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

@@ -290,8 +290,8 @@
       </el-pagination>
     </div>
   </div>
-  <AddPolicy v-else-if="isShow == 2" ref="table"/>
-  <AddCondition v-else-if="isShow == 3 || isShow == 6" :id="id" />
+  <AddPolicy v-else-if="isShow == 2" />
+  <!-- <AddCondition v-else-if="isShow == 3 || isShow == 6" :id="id" /> -->
   <Examine v-else />
 </template>
 
@@ -368,14 +368,7 @@ export default {
     comCode: (state) => state.sales.code,
   }),
   watch:{
-    isShow:(val,oval)=>{
 
-      if (val==1) {
-          console.log(val,oval,'强制跟新');
-        this.$refs.table.$forceUpdate();
-      }
-
-    }
   },
   created() {},
   methods: {

+ 3 - 0
src/views/sales_rebate/salestype_list.vue

@@ -187,6 +187,9 @@
           },
         ],
         options: [{
+            value: '',
+            label: '状态'
+          },{
             value: 1,
             label: '已启用'
           },

+ 1 - 1
src/views/supply/policy/components/policy_list.vue

@@ -198,7 +198,7 @@
 </template>
 <script>
 import Mixin from "@/mixin/index";
-import { getList } from "@/api/supply/retail";
+import { getList } from "@/api/supply/policy";
 import { downloadFiles } from "@/utils/util";
 
 export default {

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

@@ -193,7 +193,7 @@
 </template>
 
 <script>
-import { getDetail } from "@/api/supply/retail";
+import { getDetail } from "@/api/supply/policy";
 
 export default {
   name: 'RetailDetail',

+ 214 - 83
src/views/supply/policy/components/retail_examine.vue

@@ -10,35 +10,35 @@
       <el-row>
         <el-col :span="8" class="item">
           <div class="label">订单号</div>
-          <div class="value">{{detailData.id}}</div>
+          <div class="value">{{ detailData.id }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">订单日期</div>
-          <div class="value">{{detailData.theTime}}</div>
+          <div class="value">{{ detailData.theTime }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">单据状态</div>
-          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+          <div class="value">{{ detailData.examineStatus | statusFilter }}</div>
         </el-col>
         <el-col :span="16" class="item">
           <div class="label">备注</div>
-          <div class="value">{{detailData.remark}}</div>
+          <div class="value">{{ detailData.remark }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">业务员</div>
-          <div class="value">{{detailData.serviceName}}</div>
+          <div class="value">{{ detailData.serviceName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">制单人</div>
-          <div class="value">{{detailData.createName}}</div>
+          <div class="value">{{ detailData.createName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">审核人</div>
-          <div class="value">{{detailData.examineName}}</div>
+          <div class="value">{{ detailData.examineName }}</div>
         </el-col>
         <el-col :span="8" class="item">
           <div class="label">关闭人</div>
-          <div class="value">{{detailData.closeName}}</div>
+          <div class="value">{{ detailData.closeName }}</div>
         </el-col>
       </el-row>
     </div>
@@ -48,41 +48,162 @@
     </div>
 
     <div class="table" style="margin-top: 20px">
-      <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="格力折扣" prop="deductAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="现金钱包" prop="walletRebateName2" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+      <el-table
+        :data="detailData.retailOrderItemList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+        max-height="400"
+      >
+        <el-table-column
+          align="center"
+          label="序号"
+          type="index"
+          width="50"
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="销售类型"
+          prop="saleTypeName"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="产品编码"
+          prop="materialCode"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="产品名称"
+          prop="materialName"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="规格型号"
+          prop="specification"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="单位"
+          prop="unit"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="单价"
+          prop="price"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="数量"
+          prop="qty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="订单金额"
+          prop="totalAmount"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="返利类型"
+          prop="walletRebateName"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="返利金额"
+          prop="rebateAmount"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="格力折扣"
+          prop="deductAmount"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="现金钱包"
+          prop="walletRebateName2"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="实付金额"
+          prop="payAmount"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="是否直调"
+          prop="isDirectTransfer"
+          min-width="100"
+          show-overflow-tooltip
+        >
           <template slot-scope="scope">
-            {{scope.row.isDirectTransfer ? '是':'否'}}
+            {{ scope.row.isDirectTransfer ? "是" : "否" }}
           </template>
         </el-table-column>
-        <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column
+          align="center"
+          label="直调数量"
+          prop="directTransferQty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="原订单数量"
+          prop="oldQty"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="备注"
+          prop="remark"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="税率"
+          prop="tax"
+          min-width="100"
+          show-overflow-tooltip
+        ></el-table-column>
       </el-table>
     </div>
 
     <div class="main-title">
       <div class="title">审批信息</div>
-    </div> 
+    </div>
     <div class="diy-table-1">
       <el-row :gutter="0">
         <el-col :span="12" class="item">
           <div class="label">审批人</div>
-          <div class="value">{{userName}}</div>
+          <div class="value">{{ userName }}</div>
         </el-col>
         <el-col :span="12" class="item">
           <div class="label">审批结果</div>
@@ -95,39 +216,48 @@
         </el-col>
         <el-col :span="24" class="item">
           <div class="label">审批说明</div>
-          <div class="value"><el-input v-model="mainForm.remark" placeholder="请输入内容"></el-input></div>
+          <div class="value">
+            <el-input
+              v-model="mainForm.remark"
+              placeholder="请输入内容"
+            ></el-input>
+          </div>
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-button
+          type="primary"
+          @click="clickSubmitForm"
+          :loading="formLoading"
+          >{{ formLoading ? "提交中 ..." : "提 交" }}</el-button
+        >
         <el-button @click="goBack">关 闭</el-button>
       </div>
     </div>
-
   </div>
 </template>
 
 <script>
-import { getDetail, examineData } from "@/api/supply/retail";
+import { getDetail, examineData } from "@/api/supply/policy";
 
 export default {
-  name: 'RetailExamine',
-  componentName: 'RetailExamine',
-  props: ['listItem'],
+  name: "RetailExamine",
+  componentName: "RetailExamine",
+  props: ["listItem"],
   filters: {
     statusFilter(val) {
       const statusList = [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
-        { label: '审核驳回', value: 'FAIL' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        { label: "审核驳回", value: "FAIL" },
       ];
-      let obj = statusList.find(o => o.value == val);
-      return obj ? obj.label : ''
-    }
+      let obj = statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
   data() {
     return {
@@ -137,20 +267,20 @@ export default {
       formLoading: false,
       mainForm: {
         status: true,
-        remark: '',
-      }
-    }
+        remark: "",
+      },
+    };
   },
 
   computed: {
     sidebar() {
-      return this.$store.state.app.sidebar
+      return this.$store.state.app.sidebar;
     },
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
+        openSidebar: this.sidebar.opened,
+      };
     },
   },
 
@@ -161,14 +291,14 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+      this.$emit("backListFormDetail");
     },
 
     // 获取详情
     getDetail() {
-      getDetail({id: this.listItem.id}).then(res => {
+      getDetail({ id: this.listItem.id }).then((res) => {
         this.detailData = res.data;
-      })
+      });
     },
 
     // 提交审批
@@ -176,38 +306,39 @@ export default {
       this.formLoading = true;
       examineData({
         id: this.listItem.id,
-        examineStatus: this.mainForm.status ? 'OK' : 'FAIL',
+        examineStatus: this.mainForm.status ? "OK" : "FAIL",
         examineRemark: this.mainForm.remark,
-      }).then(res => {
-        this.$successMsg('审批成功');
-        this.goBack();
-        this.$parent.getList();
-      }).finally(res => {
-        this.formLoading = false;
       })
+        .then((res) => {
+          this.$successMsg("审批成功");
+          this.goBack();
+          this.$parent.getList();
+        })
+        .finally((res) => {
+          this.formLoading = false;
+        });
     },
-
-  }
-}
+  },
+};
 </script>
 
 <style scoped lang="scss">
-  .detail-container {
-    width: 100%;
-    height: 100%;
-  }
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    margin-top: 20px;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.detail-container {
+  width: 100%;
+  height: 100%;
+}
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 20px;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
-</style>
+}
+</style>

+ 1 - 1
src/views/supply/policy/components/retail_form.vue

@@ -690,7 +690,7 @@ import {
   getConditionList,
   getConditionDetail,
   getpolicyTypeList,
-} from "@/api/supply/retail";
+} from "@/api/supply/policy";
 import { getDictList } from "@/api/common";
 import { findElem } from "@/utils/util";
 

+ 4 - 4
src/views/supply/policy/components/retail_return.vue

@@ -77,7 +77,7 @@
 
     <div class="main-title">
       <div class="title">退订信息</div>
-    </div> 
+    </div>
     <div class="diy-table-1">
       <el-row :gutter="0">
         <el-col :span="12" class="item">
@@ -94,7 +94,7 @@
         </el-col>
       </el-row>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
@@ -106,7 +106,7 @@
 </template>
 
 <script>
-import { getDetail, returnData } from "@/api/supply/retail";
+import { getDetail, returnData } from "@/api/supply/policy";
 
 export default {
   name: 'RetailReturn',
@@ -220,4 +220,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

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

@@ -726,17 +726,25 @@ export default {
                   >编辑</el-button
                 >
                 <el-popconfirm
-                v-if="scope.row.examineStatus =='WAIT'"
+                  v-if="scope.row.examineStatus == 'WAIT'"
                   style="margin-left: 10px"
                   title="确定撤回?"
                   @onConfirm="handleCancel(scope.row.id)"
                 >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
-                <el-button     style="margin-left: 10px" type="text" @click="toDetail(scope.row)"
+                <el-button
+                  style="margin-left: 10px"
+                  type="text"
+                  @click="toDetail(scope.row)"
                   >详情</el-button
                 >
-                  <el-popconfirm style="margin-left: 10px;" title="确定关闭吗?" @onConfirm="handleClose(scope.row.id)" v-if="!scope.row.closeTime" >
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定关闭吗?"
+                  @onConfirm="handleClose(scope.row.id)"
+                  v-if="!scope.row.closeTime"
+                >
                   <el-button slot="reference" type="text">关闭</el-button>
                 </el-popconfirm>
               </template>
@@ -788,7 +796,7 @@ import {
   closeData,
   submitData,
   submitCancel,
-} from "@/api/supply/retail";
+} from "@/api/supply/policy";
 import RetailDetail from "./components/retail_detail";
 import RetailForm from "./components/retail_form";
 import RetailExamine from "./components/retail_examine";
@@ -827,7 +835,6 @@ export default {
         status: "",
       },
       statusList: [
-
         { label: "已保存", value: "SAVE" },
         { label: "待审核", value: "WAIT" },
         { label: "审核通过", value: "OK" },
@@ -928,7 +935,7 @@ export default {
     // 进入表单
     toForm(item) {
       this.queryItem = item;
-      console.log(item,99999);
+      console.log(item, 99999);
       this.isShowForm = true;
     },