浏览代码

修改 返利 出厂价 消费记录 采购入库

Qukatie 6 月之前
父节点
当前提交
7177419a31

+ 14 - 0
src/api/tirePartsMall/purchasingManagement/warehouseEntryOrder.js

@@ -101,4 +101,18 @@ export const getParamservice = (current, size, params) => {
       size,
     }
   })
+}
+export const confirmShipment = (data) => {
+  return request({
+    url: '/api/blade-sales-part/ship/confirmShipment ',
+    method: 'POST',
+    data: data
+  })
+}
+export const revokeShipment = (data) => {
+  return request({
+    url: '/api/blade-sales-part/ship/revokeShipment',
+    method: 'POST',
+    data: data
+  })
 }

+ 3 - 0
src/enums/column-name.js

@@ -1950,6 +1950,9 @@ const columnName = [{
   },{
     code: 435,
     name: '轮胎商城-商城管理-共享销售共享记录列表(L)'
+  },{
+    code: 436,
+    name: '轮胎商城-基础资料-客户管理-消费记录(L)'
   }
 ]
 export const getColumnName = (key) => {

+ 65 - 42
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -1030,48 +1030,71 @@ export default {
             this.data[index] = this.data.splice(index + 1, 1, row)[0]
         },
         inPriceAD() {
-            this.$prompt('请输入出厂价', '调整出厂价', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                closeOnClickModal: false,
-                inputValue: 0,
-                inputType: 'number'
-            }).then(({ value }) => {
-                this.data.forEach(e => {
-                    e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, value, 3)
-                    e.totalValue = multiply(e.outFactoryPrice, e.orderQuantity)
-                    e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
-                    e.amount = amountCal(
-                        addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
-                        e.orderQuantity,
-                        e.freight,
-                        e.insurance,
-                        e.discount
-                    );
-                    e.itemMargin = grossProfitCal(
-                        e.purchaseAmount,
-                        e.partsPrice,
-                        e.outFactoryPrice,
-                        this.form.exchangeRate
-                    );
-                    e.goodsGrossProfit = goodsGrossProfitCal(
-                        e.purchaseAmount,
-                        e.partsPrice,
-                        e.outFactoryPrice,
-                        this.form.exchangeRate
-                    );
-                    // 处理单品毛利率是 -00.00 的问题
-                    if (Number(e.itemMargin) === 0) {
-                        e.itemMargin = Number(e.itemMargin) + ''
-                    }
-                    if (Number(e.goodsGrossProfit) == 0) {
-                        e.goodsGrossProfit = Number(e.goodsGrossProfit)
-                    }
-                    // 出厂价格为零,单品毛利润为零
-                    if (e.outFactoryPrice == 0) {
-                        e.itemMargin = 0
-                    }
-                })
+            this.$DialogForm.show({
+                title: '调整出厂价',
+                width: '30%',
+                menuPosition: 'right',
+                option: {
+                    submitText: '确定',
+                    emptyText: '取消',
+                    span: 24,
+                    column: [{
+                        label: "出厂价(%)",
+                        prop: "value",
+                        min: 0,
+                        value: 0,
+                        type: 'number',
+                        controls: false,
+                        rules: [{
+                            required: true,
+                            message: "请输入出厂价",
+                            trigger: "blur",
+
+                        }],
+                    }]
+                },
+                beforeClose: (done) => {
+                    done()
+                },
+                callback: (res) => {
+                    res.done()
+                    this.data.forEach(e => {
+                        e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, res.data.value, 3)
+                        e.totalValue = multiply(e.outFactoryPrice, e.orderQuantity)
+                        e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
+                        e.amount = amountCal(
+                            addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
+                            e.orderQuantity,
+                            e.freight,
+                            e.insurance,
+                            e.discount
+                        );
+                        e.itemMargin = grossProfitCal(
+                            e.purchaseAmount,
+                            e.partsPrice,
+                            e.outFactoryPrice,
+                            this.form.exchangeRate
+                        );
+                        e.goodsGrossProfit = goodsGrossProfitCal(
+                            e.purchaseAmount,
+                            e.partsPrice,
+                            e.outFactoryPrice,
+                            this.form.exchangeRate
+                        );
+                        // 处理单品毛利率是 -00.00 的问题
+                        if (Number(e.itemMargin) === 0) {
+                            e.itemMargin = Number(e.itemMargin) + ''
+                        }
+                        if (Number(e.goodsGrossProfit) == 0) {
+                            e.goodsGrossProfit = Number(e.goodsGrossProfit)
+                        }
+                        // 出厂价格为零,单品毛利润为零
+                        if (e.outFactoryPrice == 0) {
+                            e.itemMargin = 0
+                        }
+                    })
+                    res.close()
+                }
             })
         },
         submitPriceAD() {

+ 65 - 42
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -1092,48 +1092,71 @@ export default {
       this.data[index] = this.data.splice(index + 1, 1, row)[0]
     },
     inPriceAD() {
-      this.$prompt('请输入出厂价', '调整出厂价', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        closeOnClickModal: false,
-        inputValue: 0,
-        inputType: 'number'
-      }).then(({ value }) => {
-        this.data.forEach(e => {
-          e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, value, 3)
-          e.totalValue = multiply(e.outFactoryPrice, e.orderQuantity)
-          e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
-          e.amount = amountCal(
-            addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
-            e.orderQuantity,
-            e.freight,
-            e.insurance,
-            e.discount
-          );
-          e.itemMargin = grossProfitCal(
-            e.purchaseAmount,
-            e.partsPrice,
-            e.outFactoryPrice,
-            this.form.exchangeRate
-          );
-          e.goodsGrossProfit = goodsGrossProfitCal(
-            e.purchaseAmount,
-            e.partsPrice,
-            e.outFactoryPrice,
-            this.form.exchangeRate
-          );
-          // 处理单品毛利率是 -00.00 的问题
-          if (Number(e.itemMargin) === 0) {
-            e.itemMargin = Number(e.itemMargin) + ''
-          }
-          if (Number(e.goodsGrossProfit) == 0) {
-            e.goodsGrossProfit = Number(e.goodsGrossProfit)
-          }
-          // 出厂价格为零,单品毛利润为零
-          if (e.outFactoryPrice == 0) {
-            e.itemMargin = 0
-          }
-        })
+      this.$DialogForm.show({
+        title: '调整出厂价',
+        width: '30%',
+        menuPosition: 'right',
+        option: {
+          submitText: '确定',
+          emptyText: '取消',
+          span: 24,
+          column: [{
+            label: "出厂价(%)",
+            prop: "value",
+            min: 0,
+            value: 0,
+            type: 'number',
+            controls: false,
+            rules: [{
+              required: true,
+              message: "请输入出厂价",
+              trigger: "blur",
+
+            }],
+          }]
+        },
+        beforeClose: (done) => {
+          done()
+        },
+        callback: (res) => {
+          res.done()
+          this.data.forEach(e => {
+            e.outFactoryPrice = priceaAjustment(e.outFactoryPrice, res.data.value, 3)
+            e.totalValue = multiply(e.outFactoryPrice, e.orderQuantity)
+            e.price = addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount)
+            e.amount = amountCal(
+              addPrice(e.outFactoryPrice, e.shareAmount, e.internationalAmount),
+              e.orderQuantity,
+              e.freight,
+              e.insurance,
+              e.discount
+            );
+            e.itemMargin = grossProfitCal(
+              e.purchaseAmount,
+              e.partsPrice,
+              e.outFactoryPrice,
+              this.form.exchangeRate
+            );
+            e.goodsGrossProfit = goodsGrossProfitCal(
+              e.purchaseAmount,
+              e.partsPrice,
+              e.outFactoryPrice,
+              this.form.exchangeRate
+            );
+            // 处理单品毛利率是 -00.00 的问题
+            if (Number(e.itemMargin) === 0) {
+              e.itemMargin = Number(e.itemMargin) + ''
+            }
+            if (Number(e.goodsGrossProfit) == 0) {
+              e.goodsGrossProfit = Number(e.goodsGrossProfit)
+            }
+            // 出厂价格为零,单品毛利润为零
+            if (e.outFactoryPrice == 0) {
+              e.itemMargin = 0
+            }
+          })
+          res.close()
+        }
       })
     },
     submitPriceAD() {

+ 4 - 0
src/views/maintenance/rebate/detailsPage.vue

@@ -85,11 +85,15 @@ export default {
                     {
                         label: "创建人",
                         prop: "createName",
+                        addDisplay: false,
+                        editDisplay: false,
                         overHidden: true,
                     },
                     {
                         label: "创建时间",
                         prop: "createTime",
+                        addDisplay: false,
+                        editDisplay: false,
                         overHidden: true,
                     }
                 ]

+ 340 - 316
src/views/tirePartsMall/basicData/customerInformation/components/limitrecord.vue

@@ -1,348 +1,372 @@
 <template>
   <basic-container>
     <el-tabs v-model="tabData" type="card" @tab-click="handleClick">
-        <el-tab-pane label="修改额度" name="XGED">
-            <avue-form ref="formEditRef" v-model="formEidtData" :option="optionEidt">
-                <template slot="amountUpdate">
-                    <el-input v-model="formEidtData.amountUpdate" size="small" clearable
-                              placeholder="请输入修改额度" @input="amountInput" ></el-input>
-                </template>
-            </avue-form>
-        </el-tab-pane>
-        <el-tab-pane label="历史记录" name="LSJL">
-            <avue-crud :option="option"
-                       :table-loading="loading"
-                       :data="data"
-                       :page.sync="page"
-                       :permission="permissionList"
-                       :before-open="beforeOpen"
-                       v-model="form"
-                       ref="crud"
-                       @row-update="rowUpdate"
-                       @row-save="rowSave"
-                       @row-del="rowDel"
-                       @search-change="searchChange"
-                       @search-reset="searchReset"
-                       @selection-change="selectionChange"
-                       @current-change="currentChange"
-                       @size-change="sizeChange"
-                       @refresh-change="refreshChange"
-                       @on-load="onLoad"
-                       @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 340)"
-                       @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 340)" >
-                <template slot="menuLeft">
-                    <el-button type="danger"
-                               size="small"
-                               icon="el-icon-delete"
-                               plain
-                               @click="handleDelete">删 除
-                    </el-button>
-                </template>
-            </avue-crud>
-        </el-tab-pane>
+      <el-tab-pane label="修改额度" name="XGED">
+        <avue-form ref="formEditRef" v-model="formEidtData" :option="optionEidt">
+          <template slot="amountUpdate">
+            <el-input v-model="formEidtData.amountUpdate" size="small" clearable placeholder="请输入修改额度"
+              @input="amountInput"></el-input>
+          </template>
+        </avue-form>
+      </el-tab-pane>
+      <el-tab-pane label="历史记录" name="LSJL">
+        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+          :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
+          @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
+          @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+          @refresh-change="refreshChange" @on-load="onLoad"
+          @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 340)"
+          @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 340)">
+          <template slot="menuLeft">
+            <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
+            </el-button>
+          </template>
+        </avue-crud>
+      </el-tab-pane>
+      <el-tab-pane label="消费记录" name="XFJL">
+        <avue-crud :option="option2" :table-loading="loading" :data="data" :page.sync="page"
+          :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate"
+          @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
+          @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+          @refresh-change="refreshChange" @on-load="onLoad"
+          @resetColumn="resetColumnTwo('crud', 'option2', 'optionList2', 436)"
+          @saveColumn="saveColumnTwo('crud', 'option2', 'optionList2', 436)">
+        </avue-crud>
+      </el-tab-pane>
     </el-tabs>
   </basic-container>
 </template>
 
 <script>
-  import {limitrecordList, limitrecordDetail, limitrecordSubmit, limitrecordRemove} from "@/api/tirePartsMall/basicData/customerInformation/limitrecord";
-  import {mapGetters} from "vuex";
-  import {regularBurdenfloating, regularInteger} from "@/util/regularJudgment";
+import { limitrecordList, limitrecordDetail, limitrecordSubmit, limitrecordRemove } from "@/api/tirePartsMall/basicData/customerInformation/limitrecord";
+import { mapGetters } from "vuex";
+import { regularBurdenfloating, regularInteger } from "@/util/regularJudgment";
+import { Header } from "element-ui";
 
-  export default {
-    data() {
-      return {
-          tabData:'XGED', // tab切换
-          // 表单的配置项
-          optionEidt:{
-              menuBtn: false,
-              column: [
-                  {
-                      label: "原额度",
-                      prop: "amountOld",
-                      disabled:true,
-                      rules: [{
-                          required: true,
-                          message: "请输入原额度",
-                          trigger: "blur"
-                      }],
-                  },
-                  {
-                      label: "修改额度",
-                      prop: "amountUpdate",
-                      rules: [{
-                          required: true,
-                          message: "请输入本次修改额度",
-                          trigger: "blur"
-                      }]
-                  },
-                  {
-                      label: "修改后额度",
-                      prop: "amountNew",
-                      disabled:true,
-                      rules: [{
-                          required: true,
-                          message: "请输入修改后额度",
-                          trigger: "blur"
-                      }]
-                  },
-                  {
-                      label: "备注",
-                      prop: "remarks",
-                      span:24,
-                      type: 'textarea',
-                      minRows: 3,
-                  },
-              ]
+export default {
+  data() {
+    return {
+      tabData: 'XGED', // tab切换
+      // 表单的配置项
+      optionEidt: {
+        menuBtn: false,
+        column: [
+          {
+            label: "原额度",
+            prop: "amountOld",
+            disabled: true,
+            rules: [{
+              required: true,
+              message: "请输入原额度",
+              trigger: "blur"
+            }],
+          },
+          {
+            label: "修改额度",
+            prop: "amountUpdate",
+            rules: [{
+              required: true,
+              message: "请输入本次修改额度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "修改后额度",
+            prop: "amountNew",
+            disabled: true,
+            rules: [{
+              required: true,
+              message: "请输入修改后额度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            span: 24,
+            type: 'textarea',
+            minRows: 3,
+          },
+        ]
+      },
+      formEidtData: {
+        amountOld: this.amountOld ? this.amountOld : 0
+      }, // 表单数据
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionList: {
+        height: 'auto',
+        maxHeight: '200',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menu: false,
+        column: [
+          {
+            label: "原额度",
+            prop: "amountOld",
+            rules: [{
+              required: true,
+              message: "请输入原额度",
+              trigger: "blur"
+            }],
+          },
+          {
+            label: "本次修改额度",
+            prop: "amountUpdate",
+            rules: [{
+              required: true,
+              message: "本次修改额度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "修改后额度",
+            prop: "amountNew",
+            rules: [{
+              required: true,
+              message: "修改后额度",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "备注",
+            prop: "remarks",
           },
-          formEidtData:{
-              amountOld:this.amountOld?this.amountOld:0
-          }, // 表单数据
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option:{},
-        optionList: {
-          height:'auto',
-          maxHeight:'200',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          menu:false,
-          column: [
-            {
-              label: "原额度",
-              prop: "amountOld",
-              rules: [{
-                required: true,
-                message: "请输入原额度",
-                trigger: "blur"
-              }],
-            },
-            {
-              label: "本次修改额度",
-              prop: "amountUpdate",
-              rules: [{
-                required: true,
-                message: "本次修改额度",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "修改后额度",
-              prop: "amountNew",
-              rules: [{
-                required: true,
-                message: "修改后额度",
-                trigger: "blur"
-              }]
-            },
-            {
-                label: "备注",
-                prop: "remarks",
-            },
-          ]
-        },
-        data: []
+        ]
+      },
+      option2: {},
+      optionList2: {
+        height: 'auto',
+        maxHeight: '200',
+        calcHeight: 30,
+        tip: false,
+        border: true,
+        index: true,
+        menu: false,
+        header: false,
+        column: [
+          {
+            label: "业务编号",
+            prop: "amountOld",
+          },
+          {
+            label: "业务类型",
+            prop: "amountUpdate",
+          },
+          {
+            label: "业务时间",
+            prop: "amountNew",
+          },
+          {
+            label: "消费额度",
+            prop: "remarks",
+          },
+        ]
+      },
+      data: [],
+      data2: []
+    };
+  },
+  props: {
+    amountOld: {
+      type: Number,
+      default: 0
+    },
+    pid: {
+      type: String,
+      default: ''
+    }
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.limitrecord_add, false),
+        viewBtn: this.vaildData(this.permission.limitrecord_view, false),
+        delBtn: this.vaildData(this.permission.limitrecord_delete, false),
+        editBtn: this.vaildData(this.permission.limitrecord_edit, false)
       };
     },
-    props:{
-        amountOld:{
-            type:Number,
-            default:0
-        },
-        pid:{
-            type:String,
-            default: ''
-        }
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(340), this.optionList);
+    this.option2 = await this.getColumnData(this.getColumnName(436), this.optionList);
+    // this.$set(this.formEidtData,'amountOld',this.amountOld?this.amountOld:0)
+  },
+  methods: {
+    // tabs 切换
+    handleClick() {
+      if (this.tabData == 'LSJL') {
+        this.query = {}
+        this.page.currentPage = 1;
+        this.onLoad(this.page, this.query);
+      }
     },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.limitrecord_add, false),
-          viewBtn: this.vaildData(this.permission.limitrecord_view, false),
-          delBtn: this.vaildData(this.permission.limitrecord_delete, false),
-          editBtn: this.vaildData(this.permission.limitrecord_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
+    // 修改额度input 监听
+    amountInput(value) {
+      this.$set(this.formEidtData, 'amountUpdate', regularBurdenfloating(value))
+      this.$set(this.formEidtData, 'amountNew', Number(this.formEidtData.amountOld) + Number(this.formEidtData.amountUpdate))
+    },
+    rowSave(row, done, loading) {
+      limitrecordSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
         });
-        return ids.join(",");
-      }
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
     },
-    async created() {
-        this.option = await this.getColumnData(this.getColumnName(340), this.optionList);
-        // this.$set(this.formEidtData,'amountOld',this.amountOld?this.amountOld:0)
+    rowUpdate(row, index, done, loading) {
+      limitrecordSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
     },
-    methods: {
-        // tabs 切换
-        handleClick(){
-            if (this.tabData == 'LSJL') {
-                this.query = {}
-                this.page.currentPage = 1;
-                this.onLoad(this.page, this.query);
-            }
-        },
-      // 修改额度input 监听
-      amountInput(value){
-          this.$set(this.formEidtData,'amountUpdate',regularBurdenfloating(value))
-          this.$set(this.formEidtData,'amountNew',Number(this.formEidtData.amountOld) + Number(this.formEidtData.amountUpdate))
-      },
-      rowSave(row, done, loading) {
-        limitrecordSubmit(row).then(() => {
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return limitrecordRemove(row.id);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        limitrecordSubmit(row).then(() => {
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return limitrecordRemove(this.ids);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+          this.$refs.crud.toggleSelection();
         });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return limitrecordRemove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return limitrecordRemove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          limitrecordDetail(this.form.id).then(res => {
-            this.form = res.data.data;
-          });
-        }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        limitrecordList(page.currentPage, page.pageSize, {
-            ...Object.assign(params, this.query),
-            pid:this.pid
-        }).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        limitrecordDetail(this.form.id).then(res => {
+          this.form = res.data.data;
         });
-      },
-      //自定义列保存
-      async saveColumnTwo(ref, option, optionBack, code) {
-          /**
-           * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-           * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-           * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-           */
-          const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
-          if (inSave) {
-              this.$message.success("保存成功");
-              //关闭窗口
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
-      //自定义列重置
-      async resetColumnTwo(ref, option, optionBack, code) {
-          this[option] = this[optionBack];
-          const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
-          if (inSave) {
-              this.$message.success("重置成功");
-              this.$refs[ref].$refs.dialogColumn.columnBox = false;
-          }
-      },
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      limitrecordList(page.currentPage, page.pageSize, {
+        ...Object.assign(params, this.query),
+        pid: this.pid
+      }).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
 
-    }
-  };
+  }
+};
 </script>
 
-<style>
-</style>
+<style></style>

+ 1 - 2
src/views/tirePartsMall/basicData/sharedSales/detailsPage.vue

@@ -112,7 +112,7 @@
                             </template>
                             <template slot="dot" slot-scope="{ row }">
                                 <el-select v-if="!mingxibaocun" v-model="row.dot" filterable default-first-option
-                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)">
+                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)" size="small">
                                     <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
                                         :value="item.dot"></el-option>
                                 </el-select>
@@ -120,7 +120,6 @@
                             </template>
                             <template slot="subTotalMoney" slot-scope="{ row }">{{ row.goodsNum * row.price
                                 }}</template>
-
                             <template slot="remarks" slot-scope="{ row }">
                                 <el-input v-if="!mingxibaocun" size="small" v-model="row.remarks"
                                     style="width: 100%"></el-input>

+ 44 - 4
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/index.vue

@@ -11,7 +11,10 @@
             class="itemTable"></avue-crud>
         </template>
         <template slot-scope="{type,size,row,index}" slot="menu">
-          <el-button v-if="row.ordNo.includes('RZCG')" :size="size" :type="type" :disabled="true">确认到货</el-button>
+          <el-button v-if="row.ordNo.includes('RZCG') && row.status == '否'" :size="size" :type="type"
+            @click="rowClick(row, 1)">确认到货</el-button>
+          <el-button v-if="row.ordNo.includes('RZCG') && row.status == '是'" :size="size" :type="type"
+            @click="rowClick(row, 2)">撤销到货</el-button>
           <el-button :size="size" :type="type" :disabled="row.item >= 1"
             @click="$refs.crud.rowDel(row, index)">删除</el-button>
         </template>
@@ -46,7 +49,7 @@
 
 <script>
 import { customerListAll } from "@/api/tirePartsMall/basicData/warehouse"
-import { getList, remove, getWarehouseKeeper, getGoodsInfo } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
+import { getList, remove, getWarehouseKeeper, getGoodsInfo, confirmShipment, revokeShipment } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import detailsPage from "./detailsPage.vue"
 import { dateFormat } from '@/util/date'
 import { getDetails } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
@@ -217,8 +220,8 @@ export default {
           prop: "customerName",
           search: true,
           overHidden: true,
-          cell:true,
-          width:140,
+          cell: true,
+          width: 140,
           // filterable: true,
           // type: 'select',
           // remote:true,
@@ -268,6 +271,11 @@ export default {
             value: "已撤销"
           }],
         }, {
+          label: "待采入库状态",
+          prop: "status",
+          width: '140',
+          overHidden: true,
+        }, {
           label: '业务日期',
           prop: "businesDate",
           searchProp: "businesDateList",
@@ -387,6 +395,38 @@ export default {
     // console.log(this.$refs.crud);
   },
   methods: {
+    rowClick(row, type) {
+      if (type == 1) {
+        this.$confirm('是否确认到货?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          confirmShipment(row).then(res => {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            this.onLoad(this.page)
+          })
+        })
+      }
+      if (type == 2) {
+        this.$confirm('是否撤销到货?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          revokeShipment(row).then(res => {
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            this.onLoad(this.page)
+          })
+        })
+      }
+    },
     check(row) {
       this.form = row
       this.detailsOpen = true

+ 1 - 2
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -13,7 +13,6 @@
                 <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
                     :disabled="isSaveBtn" @click="editCustomer">保 存
                 </el-button>
-
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" :type="buttonColor" size="small"
                     :disabled="isDisabledTask" @click="generateOutbound" v-if="form.taskWhetherAdopt != '审核提交'">
                     {{ buttonText }}
@@ -140,7 +139,7 @@
                             </template>
                             <template slot="dot" slot-scope="{ row }">
                                 <el-select v-if="!mingxibaocun" v-model="row.dot" filterable default-first-option
-                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)">
+                                    @focus="picihaolistfun(row.goodsId)" @change="dotchangefun($event, row)" size="small">
                                     <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
                                         :value="item.dot"></el-option>
                                 </el-select>