|
@ -22,9 +22,9 @@ |
|
|
v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
v-model:sort="tableObject.sort" |
|
|
v-model:sort="tableObject.sort" |
|
|
@getSelectionRows="getSelectionRows"> |
|
|
@getSelectionRows="getSelectionRows"> |
|
|
<template #number="{row}"> |
|
|
<template #supplierCode="{row}"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '供应商代码', row.supplierCode)"> |
|
|
<span>{{ row.number }}</span> |
|
|
<span>{{ row.supplierCode }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row,$index }"> |
|
|
<template #action="{ row,$index }"> |
|
@ -51,7 +51,16 @@ |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
@onEnter="onEnter"/> |
|
|
@onEnter="onEnter"> |
|
|
|
|
|
<template #searchQuerypoNumber> |
|
|
|
|
|
<div style="display:flex;flex-direction: row;"> |
|
|
|
|
|
<div v-for="dict in orderTypeArray" style="margin-right: 20px;"> |
|
|
|
|
|
<span style="margin-right: 10px;">{{dict.label}}</span> |
|
|
|
|
|
<el-switch v-model="dict.switch" @change="updateOrderTypeParams"/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</BasicForm> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<!-- 隐藏子表编辑和删除是因为要货计划以后是接口发过来的,而且我们的计划数量是放入到采购订单已计划数量里,无法再次编辑数量--> |
|
|
<!-- 隐藏子表编辑和删除是因为要货计划以后是接口发过来的,而且我们的计划数量是放入到采购订单已计划数量里,无法再次编辑数量--> |
|
@ -91,6 +100,7 @@ |
|
|
import supplierdeliverBasicForm from '../supplierdeliverRequestMain/supplierdeliverBasicForm.vue' |
|
|
import supplierdeliverBasicForm from '../supplierdeliverRequestMain/supplierdeliverBasicForm.vue' |
|
|
import * as PurchaseMainApi from '@/api/wms/purchaseMain' |
|
|
import * as PurchaseMainApi from '@/api/wms/purchaseMain' |
|
|
import { PurchaseMain } from '../purchaseMain/purchaseMain.data' |
|
|
import { PurchaseMain } from '../purchaseMain/purchaseMain.data' |
|
|
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
// 要货计划 |
|
|
// 要货计划 |
|
|
defineOptions({ name: 'PurchasePlanMain' }) |
|
|
defineOptions({ name: 'PurchasePlanMain' }) |
|
|
|
|
|
|
|
@ -107,6 +117,38 @@ |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const orderTypeArray = ref(getStrDictOptions(DICT_TYPE.PURCHASE_ORDER_TYPE).map(item=>({...item,switch:true}))) |
|
|
|
|
|
const updateOrderTypeParams = ()=>{ |
|
|
|
|
|
console.log('orderTypeArray',orderTypeArray) |
|
|
|
|
|
let orderTypeValue = [] |
|
|
|
|
|
orderTypeArray.value.forEach(item=>{ |
|
|
|
|
|
if(item.switch){ |
|
|
|
|
|
orderTypeValue.push(item.value) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(orderTypeValue.length==1){ |
|
|
|
|
|
formRef.value.searchTableRef.searchFormClick({ |
|
|
|
|
|
filters:[{ |
|
|
|
|
|
action: "==", |
|
|
|
|
|
column: "type", |
|
|
|
|
|
value: orderTypeValue[0] |
|
|
|
|
|
}] |
|
|
|
|
|
}) |
|
|
|
|
|
}else if(orderTypeValue.length==0||orderTypeValue.length==orderTypeArray.length){ |
|
|
|
|
|
formRef.value.searchTableRef.searchFormClick({ |
|
|
|
|
|
filters:[] |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
formRef.value.searchTableRef.searchFormClick({ |
|
|
|
|
|
filters:[{ |
|
|
|
|
|
action: "in", |
|
|
|
|
|
column: "type", |
|
|
|
|
|
value: orderTypeValue.join(',') |
|
|
|
|
|
}] |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row) |
|
|
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row) |
|
|