|
@@ -10,7 +10,7 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="入库日期(bill date)" v-bind="validateInfos.billDate" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="SaleOrderForm-billDate" name="billDate">
|
|
|
+ <a-form-item label="入库日期(bill date)" v-bind="validateInfos.billDate" id="SaleOrderForm-billDate" name="billDate">
|
|
|
<a-date-picker placeholder="请选择入库日期(bill date)" v-model:value="formData.billDate" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -20,8 +20,8 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="供应商(supplier)" v-bind="validateInfos.supplierName" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="SaleOrderForm-supplierName" name="supplierName">
|
|
|
- <JSelectInput v-model:value="formData.supplier" placeholder="请选择" allow-clear disabled :options="supplierOption" @change="changeSupplier"></JSelectInput>
|
|
|
+ <a-form-item label="供应商(supplier)" v-bind="validateInfos.supplierName" id="SaleOrderForm-supplierName" name="supplierName">
|
|
|
+ <a-input v-model:value="formData.supplierName" placeholder="请输入" disabled allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -30,27 +30,27 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="SaleOrderForm-productionClass" name="productionClass">
|
|
|
+ <a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="SaleOrderForm-productionClass" name="productionClass">
|
|
|
<a-input v-model:value="formData.productionClass" placeholder="请输入" allow-clear disabled ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="机型(model)" v-bind="validateInfos.model" id="SaleOrderForm-model" name="model">
|
|
|
- <JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer" disabled />
|
|
|
+ <a-input v-model:value="formData.model" placeholder="请输入" allow-clear disabled ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="厂家(maker)" v-bind="validateInfos.maker" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="SaleOrderForm-maker" name="maker">
|
|
|
+ <a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="SaleOrderForm-maker" name="maker">
|
|
|
<a-input v-model:value="formData.maker" placeholder="请输入厂家(maker)" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="货位(goods allocation)" v-bind="validateInfos.goodsAllocation" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="SaleOrderForm-goodsAllocation" name="goodsAllocation">
|
|
|
+ <a-form-item label="货位(goods allocation)" v-bind="validateInfos.goodsAllocation" id="SaleOrderForm-goodsAllocation" name="goodsAllocation">
|
|
|
<a-input v-model:value="formData.goodsAllocation" placeholder="请输入货位(goods allocation)" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="仓库(warehouse)" v-bind="validateInfos.warehouse" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="SaleOrderForm-warehouse" name="warehouse">
|
|
|
+ <a-form-item label="仓库(warehouse)" v-bind="validateInfos.warehouse" id="SaleOrderForm-warehouse" name="warehouse">
|
|
|
<a-input v-model:value="formData.warehouse" placeholder="请输入仓库(warehouse)" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -60,10 +60,16 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1" id="PuechaseInquiryFormForm-attachs" name="attachs" >
|
|
|
+ <a-form-item label="到货详情(arrival details)" v-bind="validateInfos.arrivalDetails" id="PuechaseInquiryFormForm-attachs" name="arrivalDetails" >
|
|
|
+ <a :href="baseUrl+formData.arrivalDetails">{{formData.arrivalDetails}}</a>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PuechaseInquiryFormForm-attachs" name="attachs" >
|
|
|
<JUpload v-model:value="formData.attachs"></JUpload>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</template>
|
|
@@ -108,12 +114,14 @@
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
|
|
|
<a>删除(delete)</a>
|
|
|
</a-popconfirm>
|
|
|
+ <!-- 逻辑不通暂时取消次功能 -->
|
|
|
+ <!-- <a>复制(copy)</a> -->
|
|
|
</template>
|
|
|
</j-vxe-table>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
<BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesModalRef"></BaseShipArchiveAccessoriesModal>
|
|
|
- <selectArrivalList ref="selectArrivalListRef"></selectArrivalList>
|
|
|
+ <selectArrivalList ref="SelectArrivalListRef" @selectArrrivalOrder="addStockInList"></selectArrivalList>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
@@ -125,12 +133,12 @@
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
import {purInShipColumns, stockInColumns} from '../puechaseInForm.data';
|
|
|
import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
|
|
|
- import selectArrivalList from './selectArrivalList.vue';
|
|
|
+ import selectArrivalList from '../../../publicComponents/selectArrivalList.vue';
|
|
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
|
|
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
|
|
import { JDictSelectTag} from '/@/components/Form';
|
|
|
- import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
|
|
|
import { Form, message } from 'ant-design-vue';
|
|
|
+ import { useGlobSetting } from '/@/hooks/setting';
|
|
|
import moment from 'moment';
|
|
|
const useForm = Form.useForm;
|
|
|
export default defineComponent({
|
|
@@ -140,7 +148,6 @@
|
|
|
JFormContainer,
|
|
|
JUpload,
|
|
|
JDictSelectTag,
|
|
|
- JSelectInput,
|
|
|
BaseShipArchiveAccessoriesModal,
|
|
|
selectArrivalList
|
|
|
},
|
|
@@ -154,6 +161,8 @@
|
|
|
},
|
|
|
emits:['success'],
|
|
|
setup(props, {emit}) {
|
|
|
+ const { domainUrl } = useGlobSetting();
|
|
|
+ const baseUrl = domainUrl + '/sys/common/static/';
|
|
|
const loading = ref(false);
|
|
|
const formRef = ref();
|
|
|
const SelectArrivalListRef = ref()
|
|
@@ -184,14 +193,15 @@
|
|
|
supplierName:'',
|
|
|
delivery: '',
|
|
|
productionClass: '',
|
|
|
- model: '',
|
|
|
+ model:'',
|
|
|
maker: '',
|
|
|
goodsAllocation:'',
|
|
|
warehouse:'',
|
|
|
notes:'',
|
|
|
attachs:'',
|
|
|
+ arrivalDetails:'',
|
|
|
+ typr:'1'
|
|
|
});
|
|
|
- var supplierOption = ref([]);
|
|
|
//表单验证
|
|
|
const validatorRules = reactive({
|
|
|
});
|
|
@@ -223,7 +233,6 @@
|
|
|
purInShipTable.dataSource = [];
|
|
|
stockInTable.dataSource = [];
|
|
|
activeKey.value = 'purInShip'
|
|
|
- getSupplierOption()
|
|
|
}
|
|
|
async function edit(row) {
|
|
|
//主表数据
|
|
@@ -233,7 +242,6 @@
|
|
|
purInShipTable.dataSource = [...purInShipDataList];
|
|
|
const stockInDataList = await querystockInByMainId(row['id']);
|
|
|
stockInTable.dataSource = [...stockInDataList];
|
|
|
- getSupplierOption()
|
|
|
}
|
|
|
|
|
|
async function queryMainData(id) {
|
|
@@ -250,8 +258,8 @@
|
|
|
}
|
|
|
|
|
|
const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
|
|
|
- 'purDeliveryNodeShip': purInShipTableRef,
|
|
|
- 'purDeliveryNoteArrival': stockInTableRef,
|
|
|
+ 'storePurchaseInShip': purInShipTableRef,
|
|
|
+ 'storePurchaseInDetails': stockInTableRef,
|
|
|
});
|
|
|
|
|
|
async function getFormData() {
|
|
@@ -271,6 +279,9 @@
|
|
|
}
|
|
|
|
|
|
async function submitForm() {
|
|
|
+ if( formData.sourceCode==''){
|
|
|
+ message.error('请添加入库明细!');
|
|
|
+ }else{
|
|
|
const mainData = await getFormData();
|
|
|
const subData = await getSubFormAndTableData();
|
|
|
const values = Object.assign({}, dbData, mainData, subData);
|
|
@@ -279,6 +290,7 @@
|
|
|
await saveOrUpdate(values, isUpdate);
|
|
|
//关闭弹窗
|
|
|
emit('success');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function setFieldsValue(values) {
|
|
@@ -290,7 +302,7 @@
|
|
|
}
|
|
|
function getShipList(id){
|
|
|
let params = {id:id}
|
|
|
- let url = '/purCode/purOrder/queryPurOrderShipByMainId'
|
|
|
+ let url = '/purCode/purDeliveryNote/queryPurDeliveryNodeShipByMainId'
|
|
|
defHttp.get({url:url,params}, { isTransformResponse: false }).then(res=>{
|
|
|
if(res){
|
|
|
purInShipTable.dataSource = res.result
|
|
@@ -306,43 +318,34 @@
|
|
|
function handleDelete(prop) {
|
|
|
var newArray = [...stockInTable.dataSource]
|
|
|
newArray.splice(prop.rowIndex, 1)
|
|
|
- stockInTable.dataSource = newArray
|
|
|
- }
|
|
|
- function getSupplierOption(){
|
|
|
- defHttp
|
|
|
- .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
|
|
|
- .then((res) => {
|
|
|
- if (res.success) {
|
|
|
- supplierOption.value = []
|
|
|
- res.result.records.forEach(element => {
|
|
|
- var obj = {
|
|
|
- label: element.name?element.name:'无名称请维护',
|
|
|
- value: element.id?element.id:''
|
|
|
- };
|
|
|
- supplierOption.value.push( obj)
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- // loading.value = false;
|
|
|
- });
|
|
|
- }
|
|
|
- function changeSupplier(prop){
|
|
|
- if(prop){
|
|
|
- supplierOption.value.map(item=>{
|
|
|
- if(item.value==prop){
|
|
|
- formData.supplierName = item.label
|
|
|
- }
|
|
|
- })
|
|
|
- }else{
|
|
|
- formData.supplier = ''
|
|
|
- formData.supplierName = ''
|
|
|
+ stockInTable.dataSource = newArray
|
|
|
+ if(stockInTable.dataSource.length==0){
|
|
|
+ formData.sourceCode=''
|
|
|
}
|
|
|
}
|
|
|
function selectArrivalList(){
|
|
|
SelectArrivalListRef.value.getTable(formData)
|
|
|
}
|
|
|
-
|
|
|
+ function addStockInList(data){
|
|
|
+ formData.project = data[0].project
|
|
|
+ formData.projectName = data[0].projectName
|
|
|
+ formData.supplier = data[0].supplier
|
|
|
+ formData.supplierName = data[0].supplierName
|
|
|
+ formData.delivery = data[0].delivery
|
|
|
+ formData.productionClass = data[0].productionClass
|
|
|
+ formData.model = data[0].model
|
|
|
+ formData.maker = data[0].maker
|
|
|
+ formData.sourceCode = data[0].billCode
|
|
|
+ formData.arrivalDetails = data[0].arrivalDetails
|
|
|
+ getShipList(data[0].headId)
|
|
|
+ var arr = data.concat(stockInTable.dataSource)
|
|
|
+ arr.map(item=>{
|
|
|
+ item.model = item.childModel
|
|
|
+ item.sourceId = item.childId
|
|
|
+ item.arrivalQuantity = item.quantity
|
|
|
+ })
|
|
|
+ stockInTable.dataSource=arr
|
|
|
+ }
|
|
|
/**
|
|
|
* 值改变事件触发-树控件回调
|
|
|
* @param key
|
|
@@ -373,10 +376,10 @@
|
|
|
handleDelete,
|
|
|
BaseShipArchiveAccessoriesModalRef,
|
|
|
viewAccessory,
|
|
|
- changeSupplier,
|
|
|
- supplierOption,
|
|
|
SelectArrivalListRef,
|
|
|
- selectArrivalList
|
|
|
+ selectArrivalList,
|
|
|
+ addStockInList,
|
|
|
+ baseUrl
|
|
|
}
|
|
|
}
|
|
|
});
|