Qukatie 2 yıl önce
ebeveyn
işleme
bbe92c3994

+ 9 - 0
src/api/basicData/salesOrder.js

@@ -106,3 +106,12 @@ export function collectPayment(data) {
     data:data
   })
 }
+export function orderRemove(data) {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/remove',
+    method: 'post',
+    params: {
+      id: data
+    }
+  })
+}

+ 3 - 1
src/components/dictbiz-dialog/main.vue

@@ -112,6 +112,8 @@ export default {
 </script>
   
 <style scoped lang="scss">
-
+::v-deep .el-form-item__error {
+  display: none !important;
+}
 </style>
   

+ 4 - 10
src/enums/column-name.js

@@ -876,11 +876,8 @@ const columnName = [{
   name: '客户(Y)-列表页'
 }, {
   code: 208,
-  name: '客户-客户地址'
-}, {
-  code: 208.4,
-  name: '客户-物流地址'
-}, {
+  name: '客户-送货地址'
+},{
   code: 208.1,
   name: '客户(Y)-销售记录'
 }, {
@@ -888,11 +885,8 @@ const columnName = [{
   name: '供应商(Y)-列表页'
 }, {
   code: 210,
-  name: '供应商-供应商地址'
-}, {
-  code: 210.4,
-  name: '供应商-物流地址'
-}, {
+  name: '供应商-送货地址'
+},{
   code: 210.1,
   name: '供应商(Y)-采购记录'
 }, {

+ 1 - 1
src/views/client/detailsInfo.vue

@@ -151,7 +151,7 @@
                     </el-row>
                     <el-row class="client_info" v-for="(item, index) in corpsAddrList" :key="index">
                         <el-col :span="2"><i class="el-icon-location"></i></el-col>
-                        <el-col :span="4">{{ item.type == 0 ? '客户地址' : '物流地址' }}</el-col>
+                        <el-col :span="4">送货地址</el-col>
                         <el-col :span="18">{{ item.detailedAddress }}</el-col>
                     </el-row>
                 </el-tab-pane>

+ 27 - 16
src/views/client/detailsPage.vue

@@ -27,7 +27,21 @@
         </avue-form>
       </trade-card>
       <trade-card title="地址管理" v-loading="loadingBtn">
-        <el-tabs v-model="activeName">
+        <avue-crud ref="crud" :option="option2" :data="data" :table-loading="loading" @saveColumn="saveColumn"
+              @resetColumn="resetColumn" :cell-style="cellStyle" class="address">
+              <template slot="headerSerial">
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+                  :disabled="detailData.status == 1" circle></el-button>
+              </template>
+              <template slot="menu" slot-scope="{ row, index }">
+                <el-button size="small" type="text" @click="rowCell(row, index)">{{
+                    row.$cellEdit ? "保存" : "修改"
+                }}</el-button>
+                <el-button size="small" type="text" @click="rowDel(row, index)">删除
+                </el-button>
+              </template>
+            </avue-crud>
+        <!-- <el-tabs v-model="activeName">
           <el-tab-pane label="客户地址" name="first">
             <avue-crud ref="crud" :option="option2" :data="data1" :table-loading="loading" @saveColumn="saveColumn"
               @resetColumn="resetColumn" :cell-style="cellStyle" class="address">
@@ -60,7 +74,7 @@
               </template>
             </avue-crud>
           </el-tab-pane>
-        </el-tabs>
+        </el-tabs> -->
 
       </trade-card>
       <containerTitle title="上传附件"></containerTitle>
@@ -103,6 +117,7 @@ export default {
       form2: {},
       form3: {},
       form4: {},
+      data:[],
       data1: [],
       data2: [],
       option: {
@@ -200,13 +215,11 @@ export default {
     }
   },
   async created() {
-    console.log(await this.getColumnData(this.getColumnName(208), option2))
     this.option2 = await this.getColumnData(this.getColumnName(208), option2);
-    console.log(this.option2)
-    this.option3 = await this.getColumnData(this.getColumnName(208.4), option3);
-    if (this.detailData.id) {
-      this.getDetail(this.detailData.id);
-    }
+    // this.option3 = await this.getColumnData(this.getColumnName(208.4), option3);
+    // if (this.detailData.id) {
+    //   this.getDetail(this.detailData.id);
+    // }
     if (this.detailData.status == 1) {
       this.option.disabled = true;
     }
@@ -221,7 +234,7 @@ export default {
       // this.getWorkDicts("abbreviation").then(res => {
       //   this.findObject(this.option2.column, "abbreviation").dicData = res.data.data;
       // });
-      this.$refs.crud.init();
+      // this.$refs.crud.init();
     },
     cellStyle() {
       return "padding:0;height:40px;";
@@ -238,8 +251,7 @@ export default {
       getDetails({ id: id })
         .then(res => {
           this.form = res.data.data;
-          this.data1 = res.data.data.corpsAddrList.filter(e => e.type == 0);
-          this.data2 = res.data.data.corpsAddrList.filter(e => e.type == 1);
+          this.data= res.data.data.corpsAddrList
           this.corpsFiles=res.data.data.corpsFiles
         })
         .finally(() => {
@@ -250,7 +262,7 @@ export default {
       this.form.corpName = row.cname
     },
     addRow() {
-      this.data1.push({ $cellEdit: true, type: 0 })
+      this.data.push({ $cellEdit: true})
     },
     rowCell(row, index) {
       if (row.$cellEdit == true) {
@@ -278,7 +290,7 @@ export default {
             type: "success",
             message: "删除成功!"
           });
-          this.data1.splice(index, 1);
+          this.data.splice(index, 1);
         }
       });
     },
@@ -345,12 +357,11 @@ export default {
         done();
         if (valid) {
           this.loadingBtn = true;
-          submit({ ...this.form, code: this.form.cname, corpType: "KH", corpsAddrList: this.data1.concat(this.data2) })
+          submit({ ...this.form, code: this.form.cname, corpType: "KH", corpsAddrList: this.data})
             .then(res => {
               this.$message.success("保存成功");
               this.form = res.data.data;
-              this.data1 = res.data.data.corpsAddrList.filter(e => e.type == 0);
-              this.data2 = res.data.data.corpsAddrList.filter(e => e.type == 1);
+              this.data = res.data.data.corpsAddrList
               this.corpsFiles=res.data.data.corpsFiles
             })
             .finally(() => {

+ 13 - 2
src/views/product/detailsPage.vue

@@ -39,7 +39,7 @@
             </div>
           </template>
           <template slot="whether">
-            <el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" />
+            <el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>
           </template>
         </avue-form>
       </trade-card>
@@ -395,11 +395,22 @@ export default {
           this.form = res.data.data;
           this.data = res.data.data.stockGoodsList;
           this.filesList = res.data.data.filesList
+          this.whetherChange(res.data.data.whether)
         })
         .finally(() => {
           this.loadingBtn = false;
         });
     },
+    whetherChange(val){
+      console.log(val)
+      if (val == 0||val==null) {
+          this.findObject(this.optionList.column, "lotNo").hide = true
+          this.findObject(this.optionList.column, "lotNo").showColumn = false
+        } else {
+          this.findObject(this.optionList.column, "lotNo").hide = false
+          this.findObject(this.optionList.column, "lotNo").showColumn = true
+        }
+    },
     //修改提交触发
     editCustomer() {
       this.$refs["form"].validate((valid, done) => {
@@ -454,7 +465,7 @@ export default {
     backToList() {
       this.$emit("goBack");
     }
-  }
+  },
 };
 </script>
 

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

@@ -3,7 +3,7 @@
     <basic-container v-show="show" class="page-crad">
       <el-row>
         <el-col :span="4">
-          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;">
+          <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:82vh;">
             <template slot="addBtn">
               <i class="el-icon-plus" @click="goodsTypeVisible = true"
                 style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"></i>

+ 2 - 0
src/views/product/js/optionList.js

@@ -136,6 +136,8 @@ export const optionList = {
       label: "批次号",
       prop: "lotNo",
       cell: true,
+      hide:true,
+      showColumn:false,
       overHidden: true
     },
     {

+ 10 - 1
src/views/salesOrder/detailsPage.vue

@@ -443,6 +443,7 @@ export default {
         this.form.purchaseAmount = val
         this.form.orderAmount = subtract(this.form.purchaseAmount, this.form.thisUsedProfit)
       })
+      this.$refs.crud.refreshTable();
     },
     getDetail(id) {
       this.loadingBtn = true
@@ -514,6 +515,9 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
+          if(this.data.length==0){
+            return this.$message.error('请添加一条商品信息');
+          }
           this.loadingBtn = true;
           save({ ...this.form, billType: 'XS', tradeType: 'YPJ', orderItemsList: this.data, settlementList: this.settlementList })
             .then(res => {
@@ -521,6 +525,11 @@ export default {
               this.form = res.data.data;
               this.data = res.data.data.orderItemsList;
               this.settlementList = res.data.data.settlementList
+              this.detailData.status = 1
+              this.option.disabled = true;
+              this.option2.disabled = true;
+              this.$refs.crud.refreshTable();
+              this.$refs.feeInfo.refreshTable();
             })
             .finally(() => {
               this.loadingBtn = false;
@@ -561,7 +570,7 @@ export default {
               this.form = res.data.data;
               this.data = res.data.data.orderItemsList;
               this.settlementList = res.data.data.settlementList
-              this.$emit("goBack");
+
             })
             .finally(() => {
               this.loadingBtn = false;

+ 13 - 13
src/views/salesOrder/index.vue

@@ -25,11 +25,11 @@
         <template slot-scope="{ row, index }" slot="menu">
           <!-- <el-tooltip class="item" effect="dark" content="新建销售订单" placement="top">
             <i class="tradingIcon icon-add" />
-          </el-tooltip>
+          </el-tooltip> -->
           <el-tooltip class="item" effect="dark" content="删除" placement="top">
-            <i class="tradingIcon icon-del" />
+            <i class="tradingIcon icon-del" v-if="row.confirmStatus == 0" @click.stop="rowDel(row, index)"/>
           </el-tooltip>
-          <el-tooltip class="item" effect="dark" content="编辑" placement="top">
+          <!-- <el-tooltip class="item" effect="dark" content="编辑" placement="top">
             <i class="tradingIcon icon-edit" />
           </el-tooltip>
           <el-tooltip class="item" effect="dark" content="收款" placement="top">
@@ -57,7 +57,7 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList, getCorpsAll, gainUser,getCorpType,getAllgoods } from "@/api/basicData/salesOrder";
+import { getList, getCorpsAll, gainUser,getCorpType,getAllgoods,orderRemove } from "@/api/basicData/salesOrder";
 export default {
   name: "index",
   data() {
@@ -234,15 +234,15 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        // remove(row.id).then(res => {
-        //   if (res.data.code == 200) {
-        //     this.$message({
-        //       type: "success",
-        //       message: "删除成功!"
-        //     });
-        //     this.onLoad(this.page, this.search);
-        //   }
-        // });
+        orderRemove(row.id).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.onLoad(this.page, this.search);
+          }
+        });
       });
     },
     async saveColumn() {

+ 1 - 2
src/views/salesOrder/js/optionList.js

@@ -12,8 +12,7 @@ export const option = {
   viewBtn: false,
   editBtn: false,
   delBtn: false,
-  menu: false,
-  menuWidth: 150,
+  menuWidth: 70,
   searchIcon: true,
   searchIndex: 2,
   column: [

+ 1 - 1
src/views/supplier/detailsInfo.vue

@@ -151,7 +151,7 @@
                     </el-row>
                     <el-row class="client_info" v-for="(item, index) in corpsAddrList" :key="index">
                         <el-col :span="2"><i class="el-icon-location"></i></el-col>
-                        <el-col :span="4">{{ item.type == 0 ? '供应商地址' : '物流地址' }}</el-col>
+                        <el-col :span="4">送货地址</el-col>
                         <el-col :span="18">{{ item.detailedAddress }}</el-col>
                     </el-row>
                 </el-tab-pane>

+ 24 - 12
src/views/supplier/detailsPage.vue

@@ -27,7 +27,21 @@
         </avue-form>
       </trade-card>
       <trade-card title="地址管理" v-loading="loadingBtn">
-        <el-tabs v-model="activeName">
+        <avue-crud ref="crud" :option="option2" :data="data" :table-loading="loading" @saveColumn="saveColumn"
+          @resetColumn="resetColumn" :cell-style="cellStyle" class="address">
+          <template slot="headerSerial">
+            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+              :disabled="detailData.status == 1" circle></el-button>
+          </template>
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button size="small" type="text" @click="rowCell(row, index)">{{
+                row.$cellEdit ? "保存" : "修改"
+            }}</el-button>
+            <el-button size="small" type="text" @click="rowDel(row, index)">删除
+            </el-button>
+          </template>
+        </avue-crud>
+        <!-- <el-tabs v-model="activeName">
           <el-tab-pane label="供应商地址" name="first">
             <avue-crud ref="crud" :option="option2" :data="data1" :table-loading="loading" @saveColumn="saveColumn"
               @resetColumn="resetColumn" :cell-style="cellStyle" class="address">
@@ -60,7 +74,7 @@
               </template>
             </avue-crud>
           </el-tab-pane>
-        </el-tabs>
+        </el-tabs> -->
 
       </trade-card>
       <containerTitle title="上传附件"></containerTitle>
@@ -103,7 +117,7 @@ export default {
       form2: {},
       form3: {},
       form4: {},
-      data1: [],
+      data: [],
       data2: [],
       option: {
         menuBtn: false,
@@ -201,7 +215,7 @@ export default {
   },
   async created() {
     this.option2 = await this.getColumnData(this.getColumnName(210), option2);
-    this.option3 = await this.getColumnData(this.getColumnName(210.4), option3);
+    // this.option3 = await this.getColumnData(this.getColumnName(210.4), option3);
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -236,8 +250,7 @@ export default {
       getDetails({ id: id })
         .then(res => {
           this.form = res.data.data;
-          this.data1 = res.data.data.corpsAddrList.filter(e => e.type == 0);
-          this.data2 = res.data.data.corpsAddrList.filter(e => e.type == 1);
+          this.data = res.data.data.corpsAddrList
           this.corpsFiles = res.data.data.corpsFiles
         })
         .finally(() => {
@@ -248,7 +261,7 @@ export default {
       this.form.corpName = row.cname
     },
     addRow() {
-      this.data1.push({ $cellEdit: true, type: 0 })
+      this.data.push({ $cellEdit: true, type: 0 })
     },
     rowCell(row, index) {
       if (row.$cellEdit == true) {
@@ -269,14 +282,14 @@ export default {
           //     type: "success",
           //     message: "删除成功!"
           //   });
-          //   this.data1.splice(index, 1);
+          //   this.data.splice(index, 1);
           // });
         } else {
           this.$message({
             type: "success",
             message: "删除成功!"
           });
-          this.data1.splice(index, 1);
+          this.data.splice(index, 1);
         }
       });
     },
@@ -343,12 +356,11 @@ export default {
         done();
         if (valid) {
           this.loadingBtn = true;
-          submit({ ...this.form, code: this.form.cname, corpType: "GYS", corpsAddrList: this.data1.concat(this.data2) })
+          submit({ ...this.form, code: this.form.cname, corpType: "GYS", corpsAddrList: this.data.concat(this.data2) })
             .then(res => {
               this.$message.success("保存成功");
               this.form = res.data.data;
-              this.data1 = res.data.data.corpsAddrList.filter(e => e.type == 0);
-              this.data2 = res.data.data.corpsAddrList.filter(e => e.type == 1);
+              this.data = res.data.data.corpsAddrList
               this.corpsFiles = res.data.data.corpsFiles
             })
             .finally(() => {