Просмотр исходного кода

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 1 год назад
Родитель
Сommit
223f536fc4

+ 1 - 1
src/components/popover-select-v2/index.vue

@@ -163,7 +163,7 @@ export default {
     // auto
     async useAutocomplete(prop, cb) {
       if (prop) {
-        this.page.pageSize = 25;
+        this.page.pageSize = 1000000;
         this.model.search = prop;
         await this.fetchList(this.model, this.page);
         await cb(this.data);

+ 3 - 0
src/main.js

@@ -50,6 +50,7 @@ import VueMeta from "vue-meta";
 import DictData from "@/components/DictData";
 //
 import PopoverSelect from "@/components/popover-select";
+import PopoverSelectV2 from "@/components/popover-select-v2";
 //
 import PopoverTreeSelect from "@/components/popover-tree-select";
 //
@@ -80,6 +81,7 @@ Vue.prototype.$init = {
 };
 
 // 全局组件挂载
+
 Vue.component("DictTag", DictTag);
 Vue.component("Pagination", Pagination);
 Vue.component("RightToolbar", RightToolbar);
@@ -88,6 +90,7 @@ Vue.component("FileUpload", FileUpload);
 Vue.component("ImageUpload", ImageUpload);
 Vue.component("ImagePreview", ImagePreview);
 Vue.component("DrPopoverSelect", PopoverSelect);
+Vue.component("DrPopoverSelectV2", PopoverSelectV2);
 Vue.component("DrPopoverTreeSelect", PopoverTreeSelect);
 Vue.component("DrComputedInput", ComputedInput);
 Vue.component("DrFilePreview", FilePreview);

+ 4 - 2
src/views/business/spd/target/targetTemplate/index.vue

@@ -10,6 +10,7 @@
                 <el-date-picker
                   v-model="queryParams.params.year"
                   type="year"
+                  value-format="yyyy"
                   clearable
                   >
                 </el-date-picker>
@@ -124,7 +125,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         params:{
-          year:null,
+          year: '',
         }
       },
       // 查询日期范围
@@ -201,6 +202,7 @@ export default {
         if (res.code === 200) {
           this.tableList = res.rows
           this.total = res.total
+          console.log(res, 'res---------')
         }
       })
     },
@@ -222,7 +224,7 @@ export default {
     },
     //搜索
     useSearch() {
-      console.log(this.queryParams);
+      console.log(this.queryParams, 'this.queryParams');
       this.getList(this.queryParams);
     },
     //重置

+ 0 - 1
src/views/material/classify/index.vue

@@ -76,7 +76,6 @@
                   <el-select
                     v-model="ruleForm.isEnable"
                     placeholder="启用状态"
-                    clearable
                     size="mini"
                     :disabled="disable"
                     style="width: 230px"

+ 18 - 4
src/views/purchase/DemandSummary/index.vue

@@ -283,14 +283,14 @@
           <el-table-column show-overflow-tooltip v-if="showColumn.artificialAdjust" label="人工调整数" align="center" prop="artificialAdjust" width="80px"/>
           <el-table-column show-overflow-tooltip v-if="showColumn.modifyReason" label="修改原因" align="center" prop="modifyReason" width="150px">
             <template slot-scope="scope">
-                <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason"/>
+                <el-input size="mini" :disabled="scope.row.status !== '1'|| lineDisable || scope.row.artificialAdjust == '0'" v-model="scope.row.modifyReason" @change="jilu(scope.$index)"/>
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.suggestionPurchase" label="建议采购量" align="center" prop="suggestionPurchase"  width="80px"/>
           <!-- <el-table-column show-overflow-tooltip v-if="showColumn.status" label="建议净采购量" align="center" prop="suggestBuyQty" width="100px"/> -->
           <el-table-column show-overflow-tooltip v-if="showColumn.finalBuyQty" label="最终采购量" align="center" prop="finalBuyQty" width="80px">
             <template slot-scope="scope">
-                <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty"/>
+                <el-input size="mini" :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty" @change="jilu(scope.$index)"/>
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip v-if="showColumn.materialClassifyTwoName" label="二级品类" align="center" prop="materialClassifyTwoName" width="120px"/>
@@ -504,6 +504,8 @@ export default {
       //   isPage: true,
       //   title: ''
       // }
+      // 用于保存临时记录修改行的数组
+      record:[]
     }
   },
   created() {
@@ -664,7 +666,15 @@ export default {
       this.getList(this.queryParams)
     },
     saveList() {
-      editSummaryList(this.tableList).then(res => {
+      // console.log('记录',this.record)
+      // 对记录的数据进行去重
+      let newRecord = Array.from(new Set(this.record))
+      // console.log('去重后的', newRecord)
+      let changeList = newRecord.map(i => {
+        return this.tableList[i]
+      })
+      // console.log('shuzu', changeList)
+      editSummaryList(changeList).then(res => {
         if (res.code === 200) {
           this.$modal.notifySuccess("保存成功");
           this.lineDisable = true
@@ -791,6 +801,7 @@ export default {
       }
       if (this.referCondition.title == '明细采购员') {
         console.log('选择进了吗',this.tableList)
+        this.record.push(this.tableIndex)
         this.tableList[this.tableIndex].buyer = selection[0].code
         this.tableList[this.tableIndex].buyerName = selection[0].name
       }
@@ -856,7 +867,10 @@ export default {
       this.referCondition.isPage = isPage
       this.referCondition.title = title
       this.$refs.refer.init(this.referCondition)
-    }
+    },
+    jilu(index) {
+      this.record.push(index)
+    },
   }
 }
 </script>

+ 15 - 3
src/views/purchase/transferOrder/add.vue

@@ -76,16 +76,28 @@
           </el-col>
           <el-col :span="1.5">
             <el-form-item label="客户">
-              <el-select clearable :disabled="sonDisable"
+              <DrPopoverSelectV2
+                size="mini"
+                v-model="basicForm.customerName"
+                valueKey= "name"
+                referName="CUSTOMER_PARAM"
+                :dataMapping="{
+                  customer: 'id',
+                  customerName: 'name',
+                }"
+                :source.sync="basicForm"
+              >
+              </DrPopoverSelectV2>
+
+              <!-- <el-select clearable :disabled="sonDisable"
                 size="mini"
                 v-model="basicForm.customer"
                 @clear="clean('客户')"
                 @focus="chooseRefer('CUSTOMER_PARAM', true, '客户')"
                 style="width: 200px"
               >
-                <!-- @change="controlDRHW"  -->
                 <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id"/>
-              </el-select>
+              </el-select> -->
             </el-form-item>
           </el-col>
           <el-col :span="1.5">

+ 1 - 1
src/views/purchase/transferOrder/index.vue

@@ -347,7 +347,7 @@ export default {
   data() {
     return {
       loading: true,
-      itemLoading: true,
+      itemLoading: false,
       expanded: false,
       // 页面配置
       isList: true,

+ 29 - 4
src/views/purchase/workSpace/index.vue

@@ -67,6 +67,17 @@
         </el-table-column>
       </el-table>
 
+      <el-pagination
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="queryParams.pageNum"
+        :page-sizes="[10, 20, 50, 100, 200, 500]"
+        :page-size="20"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total=total>
+      </el-pagination>
+
     </el-card>
   </div>
 </template>
@@ -82,7 +93,7 @@ export default {
         modelIds:[],
         docSubject: '',
         pageNum: 1,
-        pageSize: 10
+        pageSize: 20
       },
       loading: false,
       tableList: [],
@@ -113,11 +124,21 @@ export default {
     rowSelect() {},
     doubleClick() {},
     xxxx() {},
-    check() {},
-    agree(row) {
+    check(row) {
       console.log(row)
       this.$router.push({path: row.linkUrl ,query: {billCode: row.billCode}})
-    }
+    },
+    agree(row) {
+      
+    },
+    handleSizeChange(val) {
+      this.queryParams.pageSize = val
+      this.getList(this.queryParams)
+    },
+    handleCurrentChange(val) {
+      this.queryParams.pageNum = val
+      this.getList(this.queryParams)
+    },
   }
 }
 </script>
@@ -133,6 +154,10 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+.el-pagination {
+  margin-top: 10px;
+  text-align: right;
+}
 </style>
 <style>
 .exporttable {