Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

This commit is contained in:
2025-08-12 14:27:12 +08:00

View File

@@ -156,13 +156,15 @@
<el-form-item label="负责人" prop="owner"> <el-form-item label="负责人" prop="owner">
<el-input v-model="form.owner" placeholder="请输入负责人" /> <el-input v-model="form.owner" placeholder="请输入负责人" />
</el-form-item> </el-form-item>
<!-- 远程搜索供应商 -->
<el-form-item label="供应商" prop="supplierId"> <el-form-item label="供应商" prop="supplierId">
<el-select filterable v-model="form.supplierId" placeholder="请选择供应商"> <el-select remote filterable v-model="form.supplierId" placeholder="请选择供应商" :remote-method="remoteSearchVendor" :loading="vendorLoading">
<el-option v-for="item in vendorList" :key="item.supplierId" :label="item.name" :value="item.supplierId" /> <el-option v-for="item in vendorList" :key="item.supplierId" :label="item.name" :value="item.supplierId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 远程搜索合同 -->
<el-form-item label="合同" prop="contractId"> <el-form-item label="合同" prop="contractId">
<el-select filterable v-model="form.contractId" placeholder="请选择合同"> <el-select remote filterable v-model="form.contractId" placeholder="请选择合同" :remote-method="remoteSearchContract" :loading="contractLoading">
<el-option v-for="item in contractList" :key="item.contractId" :label="item.contractNo" :value="item.contractId" /> <el-option v-for="item in contractList" :key="item.contractId" :label="item.contractNo" :value="item.contractId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -284,7 +286,9 @@ export default {
uploadQualityCertificateInfo: undefined, uploadQualityCertificateInfo: undefined,
vendorList: [], vendorList: [],
contractList: [] vendorLoading: false,
contractList: [],
contractLoading: false
}; };
}, },
computed: { computed: {
@@ -295,8 +299,10 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getVendorList(); this.remoteSearchVendor('');
this.getContractList(); this.remoteSearchContract('');
// this.getVendorList();
// this.getContractList();
}, },
watch: { watch: {
planId: { planId: {
@@ -310,16 +316,33 @@ export default {
} }
}, },
methods: { methods: {
getVendorList() { // 默认执行一次
listSupplier().then(response => { remoteSearchVendor(query) {
this.vendorLoading = true;
listSupplier({ name: query, pageNum: 1, pageSize: 10 }).then(response => {
this.vendorList = response.rows; this.vendorList = response.rows;
}).finally(() => {
this.vendorLoading = false;
}); });
}, },
getContractList() { remoteSearchContract(query) {
listContract({ type: 'purchase' }).then(response => { this.contractLoading = true;
listContract({ contractNo: query, pageNum: 1, pageSize: 10 }).then(response => {
this.contractList = response.rows; this.contractList = response.rows;
}).finally(() => {
this.contractLoading = false;
}); });
}, },
// getVendorList() {
// listSupplier().then(response => {
// this.vendorList = response.rows;
// });
// },
// getContractList() {
// listContract({ type: 'purchase' }).then(response => {
// this.contractList = response.rows;
// });
// },
/** 查询采购计划明细列表 */ /** 查询采购计划明细列表 */
getList() { getList() {
this.loading = true; this.loading = true;