Bläddra i källkod

入库完善自定义列

wengyuwen 4 år sedan
förälder
incheckning
6ecdbd760c

+ 8 - 0
src/api/warehouse/inStock.js

@@ -173,3 +173,11 @@ export function getWarehousekeeper(query) {
     params: query
   })
 }
+// 查询列宽修改列表
+export function listQuery(query) {
+  return request({
+    url: '/anpin/stockControl/list',
+    method: 'get',
+    params:query
+  })
+}

+ 1 - 1
src/combination/listComponent.vue

@@ -269,6 +269,7 @@ export default {
     },
     //自定义列
     delRow() {
+      console.log(this.listStyle)
       this.data = {
         tableName: this.queryList.tableName,
         userId: Cookies.get("userName"),
@@ -277,7 +278,6 @@ export default {
         if (res.code == 200) {
           this.showSetting = false;
           this.queryList.columnList = this.listStyle;
-          console.log(this.getRowList)
         }
       });
     },

+ 1 - 1
src/views/basicdata/fees/index.vue

@@ -867,7 +867,7 @@ export default {
       this.reset();
       this.query();
       this.open = true;
-      this.title = "添加费用信息";
+      this.title = "添加物资信息";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {

+ 3 - 1
src/views/project/index1.vue

@@ -899,12 +899,14 @@ export default {
       this.$refs['detailform'].validate((valid) => {
         if (valid) {
           let formData = new window.FormData()
+          console.log(this.detailform)
           formData.append('tProject', JSON.stringify(this.detailform))
           formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
           addChange(formData).then(response => {
             this.$message.success("操作成功")
             if (response.data.tProject) {
-              this.detailForm = response.data.tProject
+              this.detailform = response.data.tProject
+              console.log(this.detailform)
             }
             if (response.data.tCtnpriceItems) {
               this.detailList = response.data.tCtnpriceItems

+ 62 - 22
src/views/warehouse/inStock/index.vue

@@ -43,6 +43,7 @@
         :customButton="customButton"
         :arrow="arrow"
         :seachButton="seachButton"
+        :setRowList="listStyle"
         :listStyle="listStyle"
         :queryList="queryList"/>
       <pagination
@@ -80,7 +81,7 @@
         @totalAmount="totalAmount"
         :seachButton="confirmButton"
         :customButton="detailButton"
-        :listStyle="mainStyle"
+        :listStyle="detailStyle"
         :setRowList="detailStyle"
         :tatolLabel="tatolLabel"
         :listData="listData"
@@ -95,7 +96,7 @@ import MainForm from '@/combination/MainForm'
 import { listInStock, addSave, getSave, getArea,
   getustomer,getEntry, getwarehouse, getGoodName,
   canBedelet, delRows, getWarehousekeeper, addWarehous,
-  deletMain, delFee, copyNew} from '@/api/warehouse/inStock'
+  deletMain, delFee, copyNew, listQuery} from '@/api/warehouse/inStock'
 import Cookies from 'js-cookie'
 export default {
   name: 'inStock',
@@ -495,7 +496,7 @@ export default {
           form:3,
           width:200,
           labelSize:'80',
-          rules:'',
+          rules:{ required: true, message: ' ', trigger: 'blur' },
           disabled:false
         },
         {
@@ -663,11 +664,28 @@ export default {
     }
   },
   created() {
+    console.log(Cookies.get("userName"))
+    console.log(this.queryList.tableName)
+    let data = {
+      tableName: this.queryList.tableName,
+      userId: Cookies.get("userName"),
+    };
+    this.getRow(data)
+    let list = {
+      fBilltype:'RK'
+    }
+    this.query(list)
     this.getRow()
     this.getList()
     this.selectMethods()
   },
   methods:{
+    //查询主页列数据
+    query(data){
+      listQuery(data).then(res =>{
+        this.tableData = res.rows
+      })
+    },
     //更换仓库
     changeWarehouse(){
       if(this.detailData.length != 0){
@@ -841,29 +859,43 @@ export default {
     },
     //查询列数据
     getRow() {
-      this.data = {
+      let data = {
         tableName: this.queryList.tableName,
         userId: Cookies.get("userName"),
       };
-      select(this.data).then((res) => {
-        if (res.data.length != 0) {
-          this.queryList.columnList = res.data.filter((e) => e.checked == 0);
-          this.queryList.columnList = res.data;
-          this.queryList.columnList = this.queryList.columnList.reduce((res, item) => {
-            res.push({
-              surface: item.surface,
-              label: item.label,
-              name: item.name,
-              checked: item.checked,
-              width: item.width,
-              fixed: item.fixed,
-            });
-            return res;
-          }, []);
-          this.waitFor = true
+      console.log(data)
+      select(data).then((res) => {
+        if (data.tableName === '仓库入库详情') {
+          if (res.data.length != 0) {
+            this.detailList.columnList = res.data.filter((e) => e.checked == 0);
+            this.detailList.columnList = res.data;
+            this.setRowList = res.data
+            this.detailList.columnList = this.detailList.columnList.filter((e) => e.checked == 0);
+            // this.waitFor = true
+          }else {
+            // this.waitFor = true
+            this.detailList.columnList = this.detailStyle
+            this.setRowList = this.detailStyle
+          }
+          // this.pageDisplay = false
+          // this.isItHidden = false
+          // this.inDex = this.contentOption.length
         }else {
-          this.waitFor = true
-          this.queryList.columnList = this.listStyle
+          if (res.data.length != 0) {
+            this.queryList.columnList = res.data.filter((e) => e.checked == 0);
+            this.queryList.columnList = res.data;
+            this.setRowList = res.data
+            this.queryList.columnList = this.queryList.columnList.filter((e) => e.checked == 0);
+            this.waitFor = true
+          }else {
+            this.waitFor = true
+            this.queryList.columnList = this.listStyle
+            console.log(this.queryList.columnList.fFeeid)
+            this.setRowList = this.listStyle
+          }
+          // this.pageDisplay = true
+          // this.isItHidden = true
+          // this.inDex = 4
         }
       });
     },
@@ -1123,6 +1155,14 @@ export default {
         formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
         formData.append('fBilltype', 'RK')
         addSave(formData).then(res=>{
+          console.log(res)
+          this.detailForm = res.data.warehouseBills
+          this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
+          this.detailData = res.data.tWarehousebillsCntrs
+          for(let li in this.detailData){
+            this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
+            this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
+          }
           this.$message.success("操作成功")
         })
       }else if(row.name == '入库确认'){