|
@@ -14,12 +14,12 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="仓库(warehouse)">
|
|
|
- <a-input placeholder="请输入" v-model:value="queryParams.warehouse"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model:value="queryParams.warehouse" :disabled="fatherWarehouse!==''"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="货位(goods allocation)">
|
|
|
- <a-input placeholder="请输入" v-model:value="queryParams.goodsAllocation"></a-input>
|
|
|
+ <a-input placeholder="请输入" v-model:value="queryParams.goodsAllocation" :disabled="fatherGoodsAllocation!==''"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="toggleSearchStatus">
|
|
@@ -105,7 +105,7 @@
|
|
|
</a-alert>
|
|
|
<a-table
|
|
|
:columns="columns"
|
|
|
- :row-key="record => record.childId"
|
|
|
+ :row-key="record => record.id"
|
|
|
:data-source="dataSource"
|
|
|
bordered
|
|
|
size="small"
|
|
@@ -131,11 +131,13 @@
|
|
|
let classOption = ref([])
|
|
|
var visible = ref(false)
|
|
|
var fatherProject = ref('')
|
|
|
+ var fatherWarehouse = ref('')
|
|
|
+ var fatherGoodsAllocation = ref('')
|
|
|
const columns = [
|
|
|
{
|
|
|
title: '仓库(warehouse)',
|
|
|
- dataIndex: 'billCode',
|
|
|
- key: 'billCode',
|
|
|
+ dataIndex: 'warehouse',
|
|
|
+ key: 'warehouse',
|
|
|
align:"center",
|
|
|
width:250,
|
|
|
|
|
@@ -155,9 +157,9 @@
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
- title: '供应商(customer)',
|
|
|
- dataIndex: 'customerName',
|
|
|
- key: 'customerName',
|
|
|
+ title: '供应商(supplier)',
|
|
|
+ dataIndex: 'supplierName',
|
|
|
+ key: 'supplierName',
|
|
|
align:"center",
|
|
|
width:250,
|
|
|
ellipsis: true,
|
|
@@ -171,8 +173,8 @@
|
|
|
},
|
|
|
{
|
|
|
title: '产品分类(production class)',
|
|
|
- dataIndex: 'productClass',
|
|
|
- key: 'productClass',
|
|
|
+ dataIndex: 'productionClass_dictText',
|
|
|
+ key: 'productionClass_dictText',
|
|
|
align:"center",
|
|
|
width:250,
|
|
|
},
|
|
@@ -286,7 +288,7 @@
|
|
|
});
|
|
|
function loadData(){
|
|
|
let params = getQueryParams();
|
|
|
- defHttp.get({ url: '/saleCode/saleQuotation/saleQuotationDetailsAlert',params}, { isTransformResponse: false })
|
|
|
+ defHttp.get({ url: '/storeCode/storeOnhand/list',params}, { isTransformResponse: false })
|
|
|
.then((res) => {
|
|
|
if (res.success) {
|
|
|
dataSource.value = res.result.records;
|
|
@@ -310,6 +312,16 @@
|
|
|
}else {
|
|
|
queryParams.value.project = params.project
|
|
|
}
|
|
|
+ if(fatherWarehouse.value&&fatherWarehouse.value!==''){
|
|
|
+ queryParams.value.warehouse = fatherWarehouse.value
|
|
|
+ }else{
|
|
|
+ queryParams.value.warehouse =params.warehouse
|
|
|
+ }
|
|
|
+ if(fatherGoodsAllocation.value&&fatherGoodsAllocation.value!==''){
|
|
|
+ queryParams.value.goodsAllocation = fatherGoodsAllocation.value
|
|
|
+ }else{
|
|
|
+ queryParams.value.goodsAllocation = params.goodsAllocation
|
|
|
+ }
|
|
|
return filterObj(params);
|
|
|
}
|
|
|
function handleTableChange(paginations, filters, sorter){
|
|
@@ -372,10 +384,18 @@
|
|
|
selectedRows.value = rows
|
|
|
}
|
|
|
function handleOk(){
|
|
|
- var arr = []
|
|
|
- selectedRows.value.map(item=>arr.push(item.billCode))
|
|
|
+ var arrProject = [],
|
|
|
+ arrWareHouse=[],
|
|
|
+ arrGoodsAllocation=[]
|
|
|
+ selectedRows.value.map(item=>{
|
|
|
+ arrProject.push(item.project)
|
|
|
+ arrWareHouse.push(item.warehouse)
|
|
|
+ arrGoodsAllocation.push(item.goodsAllocation)
|
|
|
+ })
|
|
|
if(selectedRowKeys.value.length==0){
|
|
|
message.error('请勾选数据');
|
|
|
+ }else if(new Set(arrProject).size!==1||new Set(arrWareHouse).size!==1||new Set(arrGoodsAllocation).size!==1){
|
|
|
+ message.error('请勾选项目、仓库、货位都相同的数据');
|
|
|
}else{
|
|
|
emit('SelectStaningStock', selectedRows.value)
|
|
|
handleCancel()
|
|
@@ -403,16 +423,21 @@
|
|
|
}
|
|
|
function getTable(formData){
|
|
|
visible.value = true
|
|
|
- if(formData.projectName&&formData.projectName!==''){
|
|
|
+ if(formData.project&&formData.project!==''){
|
|
|
fatherProject.value = formData.project
|
|
|
}else{
|
|
|
fatherProject.value = ''
|
|
|
}
|
|
|
- // if(formData.sourceCode&&formData.sourceCode!==''){
|
|
|
- // fatherSourceCode.value = formData.sourceCode
|
|
|
- // }else{
|
|
|
- // fatherSourceCode.value = ''
|
|
|
- // }
|
|
|
+ if(formData.warehouse&&formData.warehouse!==''){
|
|
|
+ fatherWarehouse.value = formData.warehouse
|
|
|
+ }else{
|
|
|
+ fatherWarehouse.value = ''
|
|
|
+ }
|
|
|
+ if(formData.goodsAllocation&&formData.goodsAllocation!==''){
|
|
|
+ fatherGoodsAllocation.value = formData.goodsAllocation
|
|
|
+ }else{
|
|
|
+ fatherGoodsAllocation.value = ''
|
|
|
+ }
|
|
|
loadData()
|
|
|
getOptiom()
|
|
|
}
|