|
|
@@ -1,4 +1,4 @@
|
|
|
-<!-- @desc:采购入库新建 @auth:常皓宁 @time:2024/03/14 14:15 -->
|
|
|
+<!-- @desc:采购退货新建 @auth:常皓宁 @time:2024/03/14 14:15 -->
|
|
|
<template>
|
|
|
<div class="main-div" style="position: relative;">
|
|
|
<loading :loading="loading" v-if="!modalVisible"></loading>
|
|
|
@@ -7,10 +7,7 @@
|
|
|
<!-- 选择来源单 -->
|
|
|
<BaseIndexButton ref="choosePurchase" name="choosePurchase"
|
|
|
:disabled="editFlag"
|
|
|
- @click="open($config.routeUrl.purEnter.choosePurchase)"/>
|
|
|
- <!-- 清空条件 -->
|
|
|
- <BaseIndexButton ref="clearDetail" name="clearDetail" :disabled="editFlag"
|
|
|
- @click="open($config.routeUrl.purEnter.clearDetail)"></BaseIndexButton>
|
|
|
+ @click="choosePurchase(true)"/>
|
|
|
</template>
|
|
|
</BaseIndexButtonGroup>
|
|
|
<DkCollapse @on-change="changeCollapse" ref="collapse">
|
|
|
@@ -25,20 +22,13 @@
|
|
|
:multiple="false"
|
|
|
:otherCondition="{supplierType:'供应商类别-采购'}"/>
|
|
|
</DkFormItem>
|
|
|
- <!-- 采购人 -->
|
|
|
- <DkFormItem prop="makingUser" :label="'采购人'">
|
|
|
- <SelectMagnifier v-model="formData.makingUser"
|
|
|
- :display-text="formData.makingUserName"
|
|
|
- :multiple="false"
|
|
|
- :type="this.$config.MagnifierType.staff">
|
|
|
- </SelectMagnifier>
|
|
|
+ <!--收货人-->
|
|
|
+ <DkFormItem prop="contactName" :label="$t('contactName')">
|
|
|
+ <InputPop ref="contactName" :readonly="true" v-model="formData.contactName"/>
|
|
|
</DkFormItem>
|
|
|
- <!--部门-->
|
|
|
- <DkFormItem prop="orgId" :label="$t('department')">
|
|
|
- <SelectMagnifier v-model="formData.orgId"
|
|
|
- :display-text="formData.orgName"
|
|
|
- :multiple="false"
|
|
|
- :type="this.$config.MagnifierType.organization"></SelectMagnifier>
|
|
|
+ <!--收货电话-->
|
|
|
+ <DkFormItem prop="contactPhone" :label="$t('contactPhone')">
|
|
|
+ <InputPop :telephone="true" ref="contactPhone" :readonly="true" v-model="formData.contactPhone"/>
|
|
|
</DkFormItem>
|
|
|
<!--来源单号-->
|
|
|
<DkFormItem prop="fromNo">
|
|
|
@@ -203,6 +193,7 @@ export default {
|
|
|
data() {
|
|
|
let self = this
|
|
|
return {
|
|
|
+ fromId:null,//采购入库单来源Id
|
|
|
//是否显示自动办理入库标识
|
|
|
showAutoFlag: true,
|
|
|
tableHeight: 450,
|
|
|
@@ -238,11 +229,12 @@ export default {
|
|
|
intoId: null,//入库单Id
|
|
|
fromId: null,//来源单Id
|
|
|
fromNo: null,//来源单号
|
|
|
- makeStaff: null,//采购人
|
|
|
purId: null,//采购入库单Id
|
|
|
purNo: null,//采购入库单号
|
|
|
supId: null,//供应商Id
|
|
|
supplierName: null,//供应商
|
|
|
+ contactName: null,//联系人
|
|
|
+ contactPhone: null,//联系电话
|
|
|
automaticFlg: false,//自动出库标识
|
|
|
remarks: null,
|
|
|
},
|
|
|
@@ -327,21 +319,15 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
- * @desc : desc
|
|
|
- * @author : 常皓宁
|
|
|
- * @date : 2024/3/15 15:41
|
|
|
- */
|
|
|
- clearDetail() {
|
|
|
- this.purchaseItemList = null
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
* @desc : 选择采购入库单
|
|
|
* @author : 常皓宁
|
|
|
* @date : 2024/3/15 13:02
|
|
|
*/
|
|
|
- choosePurchase() {
|
|
|
- this.chooseModal = this.type === this.$config.formMode.add ? true : false
|
|
|
+ choosePurchase(modalOpenFlag) {
|
|
|
+ if(modalOpenFlag){
|
|
|
+ this.chooseModal = true
|
|
|
+ this.getDataTable()
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -511,7 +497,7 @@ export default {
|
|
|
// 新建
|
|
|
if (this.type === this.$config.formMode.add) {
|
|
|
let tableFilter = this.$refs['detailTable'].getTableDataFilter();
|
|
|
- // 采购入库明细
|
|
|
+ // 采购退货明细
|
|
|
this.params.intoReturnItemVOList = tableFilter
|
|
|
// 入库中数量
|
|
|
this.params.sumQuantity = tableFilter.sum('itemQty')
|
|
|
@@ -537,7 +523,7 @@ export default {
|
|
|
if (this.type === this.$config.formMode.add) {
|
|
|
return this.excute(this.$service.purReturnService, this.$service.purReturnService.insert, this.params)
|
|
|
}
|
|
|
- //入库办理
|
|
|
+ //退货办理
|
|
|
else if (this.type === this.$config.formMode.handle) {
|
|
|
return this.excute(this.$service.purEnterService, this.$service.purEnterService.purchaseHandleInbound, this.params)
|
|
|
}
|
|
|
@@ -555,6 +541,7 @@ export default {
|
|
|
*/
|
|
|
getDataTable() {
|
|
|
let param = {}
|
|
|
+ param.fromId = this.fromId
|
|
|
param.cpId = this.$store.state.user.cpId
|
|
|
param.intoStatus = this.$config.intoStatus.yiRuKu
|
|
|
param = Object.assign(param, this.searchCond._value)
|
|
|
@@ -591,6 +578,8 @@ export default {
|
|
|
this.formData.supId = data.data.supId
|
|
|
this.formData.supplierName = data.data.supplierName
|
|
|
this.formData.remarks = data.data.remarks
|
|
|
+ this.formData.contactName = data.contactName
|
|
|
+ this.formData.contactPhone = data.contactPhone
|
|
|
let dataItem = data.dataItem
|
|
|
dataItem.map(row => {
|
|
|
let item = row
|
|
|
@@ -627,6 +616,13 @@ export default {
|
|
|
this.showAutoFlag = false;
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ activated() {
|
|
|
+ if (this.$route.query && this.$route.query.fromId) {
|
|
|
+ this.fromId = this.$route.query.fromId
|
|
|
+ this.choosePurchase(true)
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|