浏览代码

调价单

howie 3 年之前
父节点
当前提交
6ee3f894e5

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

@@ -783,7 +783,7 @@
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
             :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
+            :page-sizes="[5]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
             :total="listTotal"
@@ -907,8 +907,8 @@ export default {
                 {
                   type: "COMMONLY",
                   id: "",
-                  updPriceBillId: row.id,
-                  updPriceBillItemId: row.id,
+                  updPriceBillId: row.cid,
+                  updPriceBillItemId: row.cid,
                   walletId: e[i],
                 },
               ]);
@@ -941,8 +941,8 @@ export default {
                 {
                   type: "REBATE",
                   id: "",
-                  updPriceBillId: row.id,
-                  updPriceBillItemId: row.id,
+                  updPriceBillId: row.cid,
+                  updPriceBillItemId: row.cid,
                   walletId: e[i],
                 },
               ]);
@@ -1032,7 +1032,7 @@ export default {
                 bool: false,
               },
             ],
-            id: this.selectData[i].id,
+            cid: this.selectData[i].id,
           });
         }
         this.selectData = [];

+ 53 - 37
src/views/basic_data/material/components/modify_list-approval.vue

@@ -19,13 +19,13 @@
               <el-input
                 placeholder="请输入"
                 disabled
-                v-model="detail.billId"
+                v-model="detail.updPriceBillId"
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="调价部门" prop="account">
-              <el-input placeholder="请输入" v-model="men"  disabled></el-input>
+              <el-input placeholder="请输入" v-model="detail.adminWebsitName"  disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -33,7 +33,7 @@
               <el-input
                 disabled
                 placeholder="请输入"
-                v-model="ren"
+                v-model="detail.serviceName"
               ></el-input>
             </el-form-item>
           </el-col>
@@ -71,7 +71,7 @@
               <el-table-column
                 align="center"
                 label="存货编码"
-                prop="billId"
+                prop="materialId"
                 min-width="160"
                 show-overflow-tooltip
               ></el-table-column>
@@ -92,7 +92,7 @@
               <el-table-column
                 align="center"
                 label="计量单位"
-                prop="baseUnitId"
+                prop="unit"
                 min-width="160"
                 show-overflow-tooltip
               ></el-table-column>
@@ -105,19 +105,55 @@
               ></el-table-column>
               <el-table-column
                 align="center"
-                label="零售价"
-                prop="retailPrice"
+                label="格力折扣"
+                prop="discAmount"
                 min-width="160"
                 show-overflow-tooltip
               >
               </el-table-column>
+             <el-table-column
+                align="center"
+                label="返利类型(钱包)"
+                prop="wallets2"
+                min-width="200"
+                show-overflow-tooltip
+              >
+                <template slot-scope="scope">
+                  <template v-for="(item, index) in scope.row.wallets2">
+                    <template v-if="item.type === 'REBATE'">
+                      <el-tag
+                        type="success"
+                        style="margin: 0 10px"
+                        size="small"
+                        :key="index"
+                      >
+                        {{ item.walletName }}
+                      </el-tag>
+                    </template>
+                  </template>
+                </template>
+              </el-table-column>
               <el-table-column
                 align="center"
-                label="返利使用比例"
-                prop="rebateRate"
-                min-width="160"
+                label="现金钱包"
+                prop="wallets2"
+                min-width="200"
                 show-overflow-tooltip
               >
+                <template slot-scope="scope">
+                  <template v-for="(item, index) in scope.row.wallets2">
+                    <template v-if="item.type === 'COMMONLY'">
+                      <el-tag
+                        type="success"
+                        style="margin: 0 10px"
+                        size="small"
+                        :key="index"
+                      >
+                        {{ item.walletName }}
+                      </el-tag>
+                    </template>
+                  </template>
+                </template>
               </el-table-column>
               <el-table-column
                 align="center"
@@ -185,9 +221,9 @@
             <el-col :xs="12" :sm="12" :lg="12" class="item">
               <div class="label">审批结果</div>
               <div class="value">
-                <el-radio-group v-model="detail.examineResult">
-                  <el-radio label="通过" :value="true"></el-radio>
-                  <el-radio label="驳回" :value="false"></el-radio>
+                <el-radio-group v-model="radio">
+                  <el-radio label="OK" >通过</el-radio>
+                  <el-radio label="FAIL" >驳回</el-radio>
                 </el-radio-group>
               </div>
             </el-col>
@@ -228,23 +264,8 @@ export default {
   },
   data() {
     return {
-      radio: "",
+      radio: 'OK',
       dataList: [
-        {
-          SalesType: "*一票机*",
-          code: "23022051775",
-          name: "夏之凉变频1",
-          model: "KFR-26GW",
-          company: "套",
-          wholesale: "2999",
-          retail: "2899",
-          rebate: "0.8",
-          effectiveDate: "2021-11-02",
-          expiryDate: "2021-11-02",
-          promotion: "否",
-          number: "51",
-          release: "是",
-        },
       ],
       typeList: [],
       userList:[],
@@ -274,12 +295,7 @@ export default {
       userName: "",
     }).then((res) => {
       this.userList = res.data.records;
-      var a= this.userList.filter(k=>{
 
-        return k.roleId == this.detail.serviceId
-      })[0]
-      this.men = a.adminCompanyName
-      this.ren = a.nickName
     });
   },
   methods: {
@@ -293,12 +309,12 @@ export default {
       this.$parent.show = 1;
     },
     onSubmit() {
-
+          console.log(this.radio);
       const params = {
         ...this.detail,
-
+        examineStatus:this.radio
       };
-        params.examineResult = params.examineResult == "通过" ? true : false ;
+
       getProductRriceConfirm(params).then((res) => {
         this.$successMsg("已提交审核");
       });

+ 96 - 59
src/views/basic_data/material/components/modify_list-detail.vue

@@ -15,34 +15,29 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="单据编号" prop="billId">
               <el-input
-                placeholder="请输入"
+                placeholder="系统生成"
                 disabled
-                v-model="detail.billId"
+                v-model="detail.updPriceBillId"
               ></el-input>
             </el-form-item>
           </el-col>
 
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="调价部门" prop="account">
-              <el-input placeholder="请输入"    v-model="men" disabled></el-input>
+              <el-input placeholder="系统生成" v-model="detail.adminWebsitName" disabled></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="调价业务员" prop="operatorName">
-              <el-input
-                disabled
-                placeholder="请输入"
-                v-model="ren"
-              ></el-input>
+              <el-input disabled placeholder="系统生成" v-model="detail.serviceName"></el-input>
             </el-form-item>
           </el-col>
 
-
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="文件编码" prop="operatorName">
               <el-input
                 disabled
-                placeholder="请输入"
+                placeholder="系统生成"
                 v-model="detail.remark"
               ></el-input>
             </el-form-item>
@@ -64,14 +59,14 @@
                 align="center"
                 label="销售类型"
                 prop="saleTypeId"
-                 :formatter="formatterType"
+                :formatter="formatterType"
                 min-width="160"
                 show-overflow-tooltip
               ></el-table-column>
               <el-table-column
                 align="center"
                 label="存货编码"
-                prop="billId"
+                prop="materialId"
                 min-width="160"
                 show-overflow-tooltip
               ></el-table-column>
@@ -92,7 +87,7 @@
               <el-table-column
                 align="center"
                 label="计量单位"
-                prop="baseUnitId"
+                prop="unit"
                 min-width="160"
                 show-overflow-tooltip
               ></el-table-column>
@@ -105,19 +100,55 @@
               ></el-table-column>
               <el-table-column
                 align="center"
-                label="零售价"
-                prop="retailPrice"
+                label="格力折扣"
+                prop="discAmount"
                 min-width="160"
                 show-overflow-tooltip
               >
               </el-table-column>
               <el-table-column
                 align="center"
-                label="返利使用比例"
-                prop="rebateUseRate"
-                min-width="160"
+                label="返利类型(钱包)"
+                prop="wallets2"
+                min-width="200"
+                show-overflow-tooltip
+              >
+                <template slot-scope="scope">
+                  <template v-for="(item, index) in scope.row.wallets2">
+                    <template v-if="item.type === 'REBATE'">
+                      <el-tag
+                        type="success"
+                        style="margin: 0 10px"
+                        size="small"
+                        :key="index"
+                      >
+                        {{ item.walletName }}
+                      </el-tag>
+                    </template>
+                  </template>
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                label="现金钱包"
+                prop="wallets2"
+                min-width="200"
                 show-overflow-tooltip
               >
+                <template slot-scope="scope">
+                  <template v-for="(item, index) in scope.row.wallets2">
+                    <template v-if="item.type === 'COMMONLY'">
+                      <el-tag
+                        type="success"
+                        style="margin: 0 10px"
+                        size="small"
+                        :key="index"
+                      >
+                        {{ item.walletName }}
+                      </el-tag>
+                    </template>
+                  </template>
+                </template>
               </el-table-column>
               <el-table-column
                 align="center"
@@ -170,42 +201,49 @@
             </el-table>
           </div>
         </div>
-    <div class="diy-table-1">
-      <el-row :gutter="0">
-        <el-col :xs="12" :sm="8" :lg="8" class="item">
-          <div class="label">审批人</div>
-          <div class="value">{{this.$store.getters.name }}</div>
-        </el-col>
-        <el-col :xs="12" :sm="8" :lg="8" class="item">
-          <div class="label">审批结果</div>
-          <div class="value">{{detail.examineResult?'通过':'驳回'}}</div>
-        </el-col>
-        <el-col :xs="12" :sm="8" :lg="8" class="item">
-          <div class="label">审批时间</div>
-          <div class="value">{{''}}</div>
-        </el-col>
-        <el-col :xs="24" :sm="24" :lg="24" class="item">
-          <div class="label">审批说明</div>
-          <div class="value">{{detail.examineNote}}</div>
-        </el-col>
-      </el-row>
-    </div>
+        <div class="diy-table-1">
+          <el-row :gutter="0">
+            <el-col :xs="12" :sm="8" :lg="8" class="item">
+              <div class="label">审批人</div>
+              <div class="value">
+              <!-- {{ this.$store.getters.name }} -->
+              {{detail.confirmName}}
+              </div>
+            </el-col>
+            <el-col :xs="12" :sm="8" :lg="8" class="item">
+              <div class="label">审批结果</div>
+              <div class="value">
+                {{ detail.examineStatus=='OK' ? "通过" : "驳回" }}
+              </div>
+            </el-col>
+            <el-col :xs="12" :sm="8" :lg="8" class="item">
+              <div class="label">审批时间</div>
+              <div class="value">{{ detail.confirmTime }}</div>
+            </el-col>
+            <el-col :xs="24" :sm="24" :lg="24" class="item">
+              <div class="label">审批说明</div>
+              <div class="value">{{ detail.examineNote }}</div>
+            </el-col>
+          </el-row>
+        </div>
       </el-form>
     </div>
   </div>
 </template>
 
-
-
 <script>
-import { getProductRriceConfirm, getTypeList,getUserList } from "@/api/basic_data/material";
+import {
+  getProductRriceConfirm,
+  getTypeList,
+  getUserList,
+} from "@/api/basic_data/material";
 
 export default {
-  props:{
-    detail:{
-      type:Object,
-      default:{}
-    }
+  props: {
+    detail: {
+      type: Object,
+      default: {},
+    },
   },
   data() {
     return {
@@ -226,10 +264,10 @@ export default {
           release: "是",
         },
       ],
-       typeList: [],
-      userList:[],
-      men:'',
-      ren:''
+      typeList: [],
+      userList: [],
+      men: "",
+      ren: "",
     };
   },
   created() {
@@ -240,8 +278,8 @@ export default {
       saleName: "",
       status: "",
     };
-      console.log(this.detail);
-       getTypeList(params).then((res) => {
+    console.log(this.detail);
+    getTypeList(params).then((res) => {
       this.typeList = res.data.records;
     });
     getUserList({
@@ -254,16 +292,15 @@ export default {
       userName: "",
     }).then((res) => {
       this.userList = res.data.records;
-      var a= this.userList.filter(k=>{
-
-        return k.roleId == this.detail.serviceId
-      })[0]
-      this.men = a.adminCompanyName
-      this.ren = a.nickName
+      var a = this.userList.filter((k) => {
+        return k.roleId == this.detail.serviceId;
+      })[0];
+      // this.men = a.adminCompanyName;
+      // this.ren = a.nickName;
     });
   },
   methods: {
-       formatterType(row) {
+    formatterType(row) {
       return this.typeList.filter((k) => {
         return k.id == row.saleTypeId;
       })[0]?.saleName;

+ 71 - 22
src/views/basic_data/material/modify_list.vue

@@ -180,7 +180,7 @@
             <el-table-column
               align="center"
               label="格力折扣"
-              prop="retailPrice"
+              prop="discAmount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -212,11 +212,56 @@
             </el-table-column>
             <el-table-column
               align="center"
+              label="返利类型(钱包)"
+              prop="wallets"
+              min-width="200"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <template v-for="(item, index) in scope.row.wallets">
+                     <template v-if="item.type === 'REBATE'">
+
+                        <el-tag
+                  type="success"
+                  style="margin: 0 10px"
+                  size="small"
+
+                  :key="index"
+                  >
+               {{ item.walletName }}
+                </el-tag>
+                  </template
+                  >
+                </template>
+
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
               label="现金钱包"
               prop="modifyPriceDepartment"
-              min-width="160"
+              min-width="200"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                <template  v-for="(item, index) in scope.row.wallets">
+                  <template v-if="item.type === 'COMMONLY'">
+
+                   <el-tag
+                  type="success"
+                  style="margin: 0 10px"
+                  size="small"
+
+                  :key="index"
+                >
+                {{ item.walletName }}
+                </el-tag>
+                    </template
+                  >
+                </template>
+
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="调价部门"
@@ -266,7 +311,7 @@
                 <el-tag
                   type="danger"
                   v-else-if="scope.row.examineStatus == 'WAIT'"
-                  >提交</el-tag
+                  >待审核</el-tag
                 >
                 <el-tag
                   type="danger"
@@ -288,20 +333,24 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <template v-if="scope.row.examineStatus=='SAVE'">
-                     <el-popconfirm title="这是一段内容确定删除吗?" @onConfirm="handleGetPriceSubmit(scope.row.updPriceBillId)" style="margin-right:10px">
-                  <el-button type="text" slot="reference">提审</el-button>
-                </el-popconfirm>
+                <template v-if="scope.row.examineStatus == 'SAVE'">
+                  <el-popconfirm
+                    title="这是一段内容确定删除吗?"
+                    @onConfirm="handleGetPriceSubmit(scope.row.updPriceBillId)"
+                    style="margin-right: 10px"
+                  >
+                    <el-button type="text" slot="reference">提审</el-button>
+                  </el-popconfirm>
                 </template>
 
-              <template  v-if="scope.row.examineStatus=='WAIT'">
-                <el-button
-                  type="text"
-                  class="textColor"
-                  @click="approvalFn(scope.row.updPriceBillId)"
-                  >审批</el-button
-                >
-              </template>
+                <template v-if="scope.row.examineStatus == 'WAIT'">
+                  <el-button
+                    type="text"
+                    class="textColor"
+                    @click="approvalFn(scope.row.updPriceBillId)"
+                    >审批</el-button
+                  >
+                </template>
                 <el-button
                   type="text"
                   class="textColor"
@@ -343,7 +392,7 @@ import {
   getProductRriceList,
   getProductRricedel,
   getTypeList,
-  getPriceSubmit
+  getPriceSubmit,
 } from "@/api/basic_data/material";
 import { downloadFiles } from "@/utils/util";
 export default {
@@ -442,12 +491,12 @@ export default {
         });
       });
     },
-    handleGetPriceSubmit(id){
+    handleGetPriceSubmit(id) {
       console.log(id);
-      getPriceSubmit({id}).then(res=>{
-        this.$successMsg('已提审')
-        this.getList()
-      })
+      getPriceSubmit({ id }).then((res) => {
+        this.$successMsg("已提审");
+        this.getList();
+      });
     },
     approvalFn(id) {
       getProductRriceDetail({ id }).then((res) => {

+ 54 - 9
src/views/basic_data/material/price_list.vue

@@ -112,7 +112,7 @@
           <el-table-column
             align="center"
             label="产品品类"
-            prop="categoryId"
+            prop="mainName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -146,7 +146,7 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            label="主计量单位名称"
+            label="单位"
             prop="unit"
             min-width="160"
             show-overflow-tooltip
@@ -158,13 +158,58 @@
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
-            align="center"
-            label="返利比例"
-            prop="rebateUseRate"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
+              <el-table-column
+              align="center"
+              label="返利类型(钱包)"
+              prop="wallets"
+              min-width="200"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <template v-for="(item, index) in scope.row.wallets">
+                     <template v-if="item.type === 'REBATE'">
+
+                        <el-tag
+                  type="success"
+                  style="margin: 0 10px"
+                  size="small"
+
+                  :key="index"
+                  >
+               {{ item.walletName }}
+                </el-tag>
+                  </template
+                  >
+                </template>
+
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="现金钱包"
+              prop="modifyPriceDepartment"
+              min-width="200"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <template  v-for="(item, index) in scope.row.wallets">
+                  <template v-if="item.type === 'COMMONLY'">
+
+                   <el-tag
+                  type="success"
+                  style="margin: 0 10px"
+                  size="small"
+
+                  :key="index"
+                >
+                {{ item.walletName }}
+                </el-tag>
+                    </template
+                  >
+                </template>
+
+              </template>
+            </el-table-column>
           <el-table-column
             align="center"
             label="生效日期"

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

@@ -255,7 +255,7 @@
                 size="small"
                 @change="changeWallet(scope.$index)"
               >
-                <el-option label="不使用" value=""></el-option>
+                <el-option label="全部" value=""></el-option>
                 <el-option
                   v-for="item in flWalletList"
                   :key="item.customerWalletId"
@@ -302,7 +302,7 @@
                 placeholder="选择现金钱包"
                 size="small"
               >
-                <el-option label="不使用" value=""></el-option>
+                <el-option label="全部" value=""></el-option>
                 <el-option
                   v-for="item in comxjWalletList(scope.row.walletRelaList)"
                   :key="item.customerWalletId"
@@ -591,7 +591,7 @@
                     placeholder="选择销售类型"
                     style="width: 100%"
                   >
-                    <el-option label="不使用" value=""></el-option>
+                    <el-option label="全部" value=""></el-option>
                     <el-option
                       v-for="item in ztypeList"
                       :key="item.id"
@@ -839,7 +839,7 @@
       },
       comxjWalletList() {
         return (c) => {
-          console.log(c);
+          console.log(c,'现金钱包');
           const walle = [];
           const ovalVall = c == undefined || !c.length ? [] : c;
           for (let i = 0; i < this.xjWalletList.length; i++) {