瀏覽代碼

供应商模块需求修改,供应商基础概况修改 历史付款bug修改

asd26269546 2 年之前
父節點
當前提交
27855f285a

+ 40 - 2
src/view/base-manage/provider-maintenance/provider-maintenance2.vue

@@ -23,7 +23,7 @@
         </Select>
       </FormItem>
       <FormItem label="按账期查看">
-        <Select v-model="params.accountDate" style="width:150px" @on-change="changePage(1)" filterable>
+        <Select v-model="params.accountDate" style="width:150px" >
             <div slot="empty">无匹配数据</div>
             <Option  value="">全部</Option>
             <Option v-for="(i,index) in accountDateList" :value="i.accountDate" :key="index">
@@ -32,7 +32,7 @@
         </Select>
       </FormItem>
       <FormItem label="按采购周期">
-        <Select v-model="params.type" style="width:150px" @on-change="changePage(1)" filterable>
+        <Select v-model="params.type" style="width:150px">
             <div slot="empty">无匹配数据</div>
             <Option  value="">全部</Option>
             <Option v-for="(i,index) in safetyWarnDayList" :value="i.type" :key="index">
@@ -70,6 +70,12 @@
       @confirm="cfm">
     </my-modal-form>
     <provider-account-form v-model="accountShow"></provider-account-form>
+    <Modal
+      v-model="accountDateRemarkModal"
+      title="采购周期"
+      >
+      <Table :data="accountDateRemarkModalData" :columns="accountDateRemarkModalcolumns"></Table>
+    </Modal>
   </div>
 </template>
 
@@ -932,6 +938,16 @@ export default {
               style:{
                 color:'#0077ff',
                 cursor:"pointer"
+              },
+              on: {
+                click: () => {
+                  axios.post('/cloudApi/supplier/getSafetyWarnDayBySupplier',{supplierId:p.row.id}).then(res=>{
+                    this.accountDateRemarkModalData = res.data.data
+                    this.accountDateRemarkModal = true
+                  })
+                  
+                  
+                }
               }
             },
               '查看'
@@ -1039,6 +1055,28 @@ export default {
           }
         }
       ],
+      accountDateRemarkModalcolumns:[
+        {
+          title: '序号',
+          type: 'index',
+          width: 60,
+          align: 'center'
+        },
+        {
+          title: '物料编码',
+          key: 'materialCode'
+        },
+        {
+          title: '面料名称',
+          key: 'materialName'
+        },
+        {
+          title: '采购周期',
+          key: 'safetyWarnDay'
+        },
+      ],
+      accountDateRemarkModalData:[],
+      accountDateRemarkModal:false,
       tableFilter: [
         {
           name: 'Input',

+ 161 - 30
src/view/base-manage/provider-maintenance/purchaseList.vue

@@ -4,30 +4,80 @@
 		<div style="display: flex; justify-content: space-between">
 			<h3>供应商采购概况</h3>
 			<Form ref="formInline" inline :label-width="80" style="float: left">
-				<Form-item label="物料用途">
-					<Select v-model="params.PurposeIndex" style="width:200px" @on-change="selectPurposeFn" filterable>
+				<Form-item label="按产品查看">
+					<Select
+						v-model="params.PurposeIndex"
+						style="width: 150px"
+						@on-change="selectPurposeFn"
+						filterable
+					>
 						<div slot="empty">无匹配数据</div>
-						<Option  :value="999">全部</Option>
-						<Option v-for="(i,index) in selectPurposeList" :value="index" :key="index">{{ i.purpose }}</Option>
+						<Option :value="999">全部</Option>
+						<Option
+							v-for="(i, index) in selectPurposeList"
+							:value="index"
+							:key="index"
+							>{{ i.purpose }}</Option
+						>
 					</Select>
 				</Form-item>
-				<FormItem label="关键词"> 
-					<Poptip trigger="focus"  width="250" placement="bottom">
+				<FormItem label="按账期查看">
+					<Select v-model="params.accountDate" style="width: 150px">
+						<div slot="empty">无匹配数据</div>
+						<Option value="">全部</Option>
+						<Option
+							v-for="(i, index) in accountDateList"
+							:value="i.accountDate"
+							:key="index"
+						>
+							{{ i.accountDate + '天('
+							}}<span style="color: red">{{ i.count }}</span
+							>)
+						</Option>
+					</Select>
+				</FormItem>
+				<FormItem label="按采购周期">
+					<Select v-model="params.type" style="width: 150px">
+						<div slot="empty">无匹配数据</div>
+						<Option value="">全部</Option>
+						<Option
+							v-for="(i, index) in safetyWarnDayList"
+							:value="i.type"
+							:key="index"
+						>
+							{{ i.name + '('
+							}}<span style="color: red">{{ i.count }}</span
+							>)
+						</Option>
+					</Select>
+				</FormItem>
+				<FormItem label="关键词">
+					<Poptip trigger="focus" width="250" placement="bottom">
 						<div slot="content">
-						<ul style="" class="commons-select-search">
-							<li :key="i.id" v-for="i in supplierList" @click="params.search = i.name">
-							{{i.name}}
-							</li>
-						</ul>
+							<ul style="" class="commons-select-search">
+								<li
+									:key="i.id"
+									v-for="i in supplierList"
+									@click="params.search = i.name"
+								>
+									{{ i.name }}
+								</li>
+							</ul>
 						</div>
-						<Input v-model="params.search" @on-change="getSupplierSelectList" placeholder="请输入用途关键词"></Input>
+						<Input
+							v-model="params.search"
+							@on-change="getSupplierSelectList"
+							placeholder="请输入用途关键词"
+						></Input>
 					</Poptip>
-					
 				</FormItem>
 				<Button
 					type="primary"
 					style="margin-right: 10px"
-					@click="changePage(1);getStatisticsClassify()"
+					@click="
+						changePage(1)
+						getStatisticsClassify()
+					"
 					>查询</Button
 				>
 				<Button type="primary" @click="$router.push('/pay_history')"
@@ -77,6 +127,12 @@
 			@confirm="cfm"
 		>
 		</my-modal-form>
+		<Modal v-model="accountDateRemarkModal" title="采购周期">
+			<Table
+				:data="accountDateRemarkModalData"
+				:columns="accountDateRemarkModalcolumns"
+			></Table>
+		</Modal>
 	</div>
 </template>
 
@@ -93,7 +149,6 @@ export default {
 		MyModalForm,
 		ProviderAccountForm,
 		renderListimgs,
-		
 	},
 	data() {
 		const v = this
@@ -421,6 +476,37 @@ export default {
 					},
 				},
 				{
+					title: '采购周期',
+					key: 'accountDateRemark',
+					minWidth: 100,
+					render: (h, p) => {
+						return h(
+							'span',
+							{
+								style: {
+									color: '#0077ff',
+									cursor: 'pointer',
+								},
+								on: {
+									click: () => {
+										axios
+											.post(
+												'/cloudApi/supplier/getSafetyWarnDayBySupplier',
+												{ supplierId: p.row.id }
+											)
+											.then((res) => {
+												this.accountDateRemarkModalData =
+													res.data.data
+												this.accountDateRemarkModal = true
+											})
+									},
+								},
+							},
+							'查看'
+						)
+					},
+				},
+				{
 					title: '采购总额',
 					key: 'sumMoney',
 					minWidth: 100,
@@ -512,43 +598,86 @@ export default {
 				TechnologyType: null,
 				Purpose: null,
 				search: null,
-				PurposeIndex:null,
+				PurposeIndex: null,
 			},
 			statisticsClassifyData: [],
-			supplierList:[],
-			selectPurposeList:[],
+			supplierList: [],
+			selectPurposeList: [],
 			total: 0,
+			accountDateList: [],
+			safetyWarnDayList: [],
+			accountDateRemarkModalcolumns: [
+				{
+					title: '序号',
+					type: 'index',
+					width: 60,
+					align: 'center',
+				},
+				{
+					title: '物料编码',
+					key: 'materialCode',
+				},
+				{
+					title: '面料名称',
+					key: 'materialName',
+				},
+				{
+					title: '采购周期',
+					key: 'safetyWarnDay',
+				},
+			],
+			accountDateRemarkModalData: [],
+			accountDateRemarkModal:false
 		}
 	},
 	methods: {
-		getSupplierSelectList(req){
+		getSafetyWarnDayList() {
+			const v = this
+			axios
+				.post('/cloudApi/supplier/getSafetyWarnDayList', {})
+				.then((res) => {
+					console.log(res)
+					v.safetyWarnDayList = res.data.data
+				})
+		},
+		getAccountDateList() {
+			const v = this
+			axios
+				.post('/cloudApi/supplier/getAccountDateList', {})
+				.then((res) => {
+					console.log(res)
+					v.accountDateList = res.data.data
+				})
+		},
+		getSupplierSelectList(req) {
 			const v = this
 			v.loading = true
 			axios
-				.post('/cloudApi/supplier/selectList', {search:this.params.search})
+				.post('/cloudApi/supplier/selectList', {
+					search: this.params.search,
+				})
 				.then((res) => {
-				v.supplierList = res.data.data
-				v.loading = false
-				console.log(v.supplierList)
+					v.supplierList = res.data.data
+					v.loading = false
+					console.log(v.supplierList)
 				})
 		},
-		selectPurposeFn(e){
+		selectPurposeFn(e) {
 			console.log(e)
-			if(e == 999){
+			if (e == 999) {
 				this.params.Purpose = ''
-			}else{
+			} else {
 				this.params.Purpose = this.selectPurposeList[e].purpose
 			}
-		
 		},
-		getMaterialSelectPurposeList(){
+		getMaterialSelectPurposeList() {
 			const v = this
 			v.loading = true
 			axios
 				.get('/cloudApi/material/selectPurposeList?purpose=' + '', {})
 				.then((res) => {
-				v.selectPurposeList = res.data.data
-				v.loading = false
+					v.selectPurposeList = res.data.data
+					v.loading = false
 				})
 		},
 		cfm() {},
@@ -652,6 +781,8 @@ export default {
 		this.getStatisticsClassify()
 		this.getMaterialSelectPurposeList()
 		this.getSupplierSelectList()
+		this.getSafetyWarnDayList()
+		this.getAccountDateList()
 	},
 }
 </script>

+ 9 - 7
src/view/material-manege/pay/pay-history.vue

@@ -204,7 +204,7 @@
       </div>
       <!-- 分页 -->
       <div class="table-page">
-        <Page :current="params.pageIndex" :total="params.total" :show-total="true" :page-size="10" show-elevator @on-change="changePage" />
+        <Page :current="params.pageNum" :total="params.total" :show-total="true" :page-size="10" show-elevator @on-change="changePage" />
       </div>
     </div>
     <pass-modal v-model="passShow" :data="currentItem" @getlist="getList"></pass-modal>
@@ -316,7 +316,7 @@ export default {
     },
     changeCompany(_id,index,_name){
 			const v = this
-			v.params.pageIndex = 1
+			v.params.pageNum = 1
 			if(v.params.supplierId == _id || _id == null){
 				// v.showList = v.showListCopy.slice(0,10)
 				v.params.supplierId = null
@@ -334,13 +334,13 @@ export default {
         //v.searchFn()
     },
     filterChange () {
-      this.params.pageIndex = 1
+      this.params.pageNum = 1
       this.params.materialCode = ''
       this.getHistoryPaymentMaterial()
       this.getList()
     },
     materialChange () {
-      this.params.pageIndex = 1
+      this.params.pageNum = 1
       this.getList()
     },
     back () {
@@ -361,8 +361,8 @@ export default {
         })
       }
     },
-    changePage (pageIndex) {
-      this.params.pageIndex = pageIndex
+    changePage (pageNum) {
+      this.params.pageNum = pageNum
       this.getList()
     },
     showForm (type, item) {
@@ -372,7 +372,7 @@ export default {
         case 0:
           this.currentItem.id = this.currentItem.payBillId
           GetApplyPurchasePageList({
-            pageIndex: 1,
+            pageNum: 1,
             pageSize: 1,
             purBillState: 1,
             keyWord: this.currentItem.applyBillNo
@@ -465,10 +465,12 @@ export default {
     },
     getList () {
         const v = this
+        this.$Spin.show();
         axios
             .post('/cloudApi/purchaseContract/pay/list', v.params).then(res=>{
                 this.data = res.data.data
                 console.log(this.data)
+                this.$Spin.hide();
             })
         axios
             .post('/cloudApi/purchaseContract/pay/list/count', v.params).then(res=>{