|
@@ -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>
|