feat: 三方出入库明细功能

dev_ksck2.0
chenhc 1 year ago
parent 8707d9fa03
commit 4838ccad06

@ -63,6 +63,18 @@ export function generateOrder(query) {
data: query
})
}
/**
* 生成单据
* @param query
* @returns {*}
*/
export function generateGhOrder(query) {
return axios({
url: '/udiwms/thrsys/generateGhOrder',
method: 'post',
data: query
})
}
/**
* 刷新单据
* @param query
@ -75,5 +87,18 @@ export function refreshBill(query) {
data: query
})
}
/**
* 刷新单据高耗
* @param query
* @returns {*}
*/
export function refreshGhBill(query) {
return axios({
url: '/udiwms/thrsys/refreshGhOrder',
method: 'post',
data: query
})
}

@ -102,12 +102,15 @@
<el-button type="text" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
<el-button v-show="scope.row.status == 0" type="text" @click.native.stop="generateBill(scope.row)" STYLE="color:rgb(0,0,255)"
<el-button v-show="scope.row.status == 0 && (scope.row.exMsg === null || scope.row.exMsg === '')" type="text" @click.native.stop="generateBill(scope.row)" STYLE="color:rgb(0,0,255)"
>生成单据
</el-button>
<el-button v-show="scope.row.status == 1" type="text" @click.native.stop="generateBill(scope.row)" STYLE="color:rgb(0,220,255)"
<el-button v-show="scope.row.status == 1 && (scope.row.exMsg === null || scope.row.exMsg === '')" type="text" @click.native.stop="generateBill(scope.row)" STYLE="color:rgb(0,220,255)"
>重新生成
</el-button>
<el-button v-show="scope.row.exMsg !== null && scope.row.exMsg !== ''" type="text" @click.native.stop="refreshGhBill(scope.row)"
>更新
</el-button>
</template>
</el-table-column>
</el-table>
@ -120,14 +123,17 @@
/>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table v-loading="loading" :data="detailList" width="100%" :row-style="changRed" border highlight-current-row>
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="物资编码" prop="relId"></el-table-column>
<el-table-column label="第三方项目编码" prop="thrCode"></el-table-column>
<!-- <el-table-column label="物资编码" prop="relId"></el-table-column>-->
<!-- <el-table-column label="第三方项目编码" prop="thrCode"></el-table-column>-->
<el-table-column label="UDI" prop="udiCode"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="产品通用名" prop="cpmctymc" show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="DI" prop="nameCode" show-overflow-tooltip="true"></el-table-column>-->
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="序列号" prop="serialNo"></el-table-column>
<el-table-column label="计量单位" prop="measname"></el-table-column>
<el-table-column label="价格" prop="price"></el-table-column>
<!-- <el-table-column label="生产日期" prop="productDate"></el-table-column>-->
@ -164,13 +170,14 @@
<thrInvOrderGenerate
:generateOrderDate=thisData
:originTypes=originTypes
:sourceType = 3
:closeAddDialog="closeAddDialog">
</thrInvOrderGenerate>
</el-dialog>
</div>
</template>
<script>
import {delThrInvOrder, getThrInvOrders, getThrInvOrderDetails,delThrInvOrderDetail} from "@/api/thrsys/thrInvOrder";
import {delThrInvOrder, getThrInvOrders, getThrInvOrderDetails,delThrInvOrderDetail,refreshGhBill} from "@/api/thrsys/thrInvOrder";
import {getBussinessType} from "@/api/basic/bussinessType";
import {getOriginBusType} from "@/api/basic/busOriginType";
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
@ -241,6 +248,31 @@ export default {
};
},
methods: {
refreshGhBill(row){
let rQuery = {
billNo: row.billNo,
};
refreshGhBill(rQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("更新成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
},
changRed({row}){
if (row.relId == null) { //
return {
color: "red" // return color backgroundColor
}
}
},
onReset() {
this.$router.push({
path: "",
@ -248,6 +280,7 @@ export default {
this.filterQuery = {
billNo: "",
thirdSysFk: "",
sourceType: 3,
// billFlag: null,
billType: null,
startDate: null,

@ -172,6 +172,7 @@
<thrInvOrderGenerate
:generateOrderDate=thisData
:originTypes=originTypes
:sourceType = 1
:closeAddDialog="closeAddDialog">
</thrInvOrderGenerate>
</el-dialog>

@ -5,7 +5,8 @@
<el-form-item label="来源单据号:" prop="code">
<el-input style="width: 90%" size="small" placeholder="请输入来源单据号"
disabled
v-model.trim="generateOrderDate.billNo"></el-input>
v-model.trim="generateOrderDate.billNo"
></el-input>
</el-form-item>
</el-col>
</el-row>
@ -59,33 +60,34 @@
</el-row>
<el-row type="flex">
<el-form-item
prop="fromCorp"
label="往来信息:">
<el-select
v-model="generateOrderDate.fromCorp"
filterable
remote
clearable
reserve-keyword
style="width: 90%"
placeholder="请输入往来信息"
:remote-method="findMethod"
:loading="loading"
:disabled="corpOrderIdDisabled"
prop="fromCorp"
label="往来信息:"
>
<el-option
v-for="item in fromOptions"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
<el-select
v-model="generateOrderDate.fromCorp"
filterable
remote
clearable
reserve-keyword
style="width: 90%"
placeholder="请输入往来信息"
:remote-method="findMethod"
:loading="loading"
:disabled="corpOrderIdDisabled"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-option
v-for="item in fromOptions"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-row>
<div style='text-align: center; margin-bottom: 10px;'>
<div style="text-align: center; margin-bottom: 10px;">
<el-button type="primary" @click="generateOrder"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
@ -94,10 +96,10 @@
</template>
<script>
import {generateOrder} from "@/api/thrsys/thrInvOrder";
import { generateOrder,generateGhOrder } from '@/api/thrsys/thrInvOrder'
import { findByFrom, findInvByUser } from '../../../api/system/invSubWarehouse'
import { parseTime } from '../../../utils/coTools'
import {findByInvUser, getBusTypeList} from "@/api/basic/busType";
import { findByInvUser, getBusTypeList } from '@/api/basic/busType'
import { getBasicUnitMaintains } from '../../../api/basic/basicUnitMaintain'
export default {
@ -105,15 +107,19 @@ export default {
props: {
generateOrderDate: {
type: Object,
required: true,
required: true
},
closeAddDialog: {
type: Function,
required: true,
required: true
},
originTypes: {
type: Object,
required: true,
required: true
},
sourceType: {
type: Object,
required: true
}
},
data() {
@ -146,133 +152,149 @@ export default {
corpType: 0,
genUnit: false,
checkWebNew: null,
mainAction: null,
mainAction: null
}
}
},
methods:{
methods: {
//
generateOrder(){
generateOrder(this.generateOrderDate).then((res) => {
if (res.code == 20000) {
this.$message.success("生成成功!");
//
this.$emit("closeAddDialog", true);
this.closeAddDialog(true);
} else
this.$message.error(res.message);
}).catch((error) => {
this.$message.error(error.message);
})
generateOrder() {
if (this.sourceType === 1 || this.sourceType === 2 ){
generateOrder(this.generateOrderDate).then((res) => {
if (res.code == 20000) {
this.$message.success('生成成功!')
//
this.$emit('closeAddDialog', true)
this.closeAddDialog(true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.$message.error(error.message)
})
}else if (this.sourceType === 3){
generateGhOrder(this.generateOrderDate).then((res) => {
if (res.code == 20000) {
this.$message.success('生成成功!')
//
this.$emit('closeAddDialog', true)
this.closeAddDialog(true)
} else {
this.$message.error(res.message)
}
}).catch((error) => {
this.$message.error(error.message)
})
}
},
//
findInvListByUser() {
this.curInvOptions = [];
this.curInvOptions = []
findInvByUser()
.then((response) => {
this.curInvOptions = response.data || [];
this.curInvOptions = response.data || []
if (
this.curInvOptions != null &&
this.curInvOptions.length > 0 &&
this.generateOrderDate.invWarehouseCode == null
) {
//this.orderFormData.invCode = this.curInvOptions[0].code;
this.getBusTypeByInv();
this.getBusTypeByInv()
}
})
.catch(() => {
});
})
},
//
changeInv(row) {
this.generateOrderDate.action = null;
this.generateOrderDate.checkPreInOrders = null;
this.checkPreInArray = [];
this.generateOrderDate.action = null
this.generateOrderDate.checkPreInOrders = null
this.checkPreInArray = []
if (this.documentShow) {
this.documentShow = false;
this.documentShow = false
}
this.curSpaceShow = false;
this.preInSpaceShow = false;
this.preSpaceShow = false;
this.generateOrderDate.curSpaceCode = false;
this.generateOrderDate.checkPreInSpaceCode = false;
this.generateOrderDate.preCurSpaceCode = false;
this.getBusTypeByInv();
this.curSpaceShow = false
this.preInSpaceShow = false
this.preSpaceShow = false
this.generateOrderDate.curSpaceCode = false
this.generateOrderDate.checkPreInSpaceCode = false
this.generateOrderDate.preCurSpaceCode = false
this.getBusTypeByInv()
},
//
actionChange(item) {
this.generateOrderDate.checkPreInOption = null;
this.generateOrderDate.checkPreInOrders = null;
this.checkPreInArray = [];
this.curAction = this.getActionItem(item);
this.bizShow = false;
this.generateOrderDate.checkPreInOption = null
this.generateOrderDate.checkPreInOrders = null
this.checkPreInArray = []
this.curAction = this.getActionItem(item)
this.bizShow = false
//2.
this.generateOrderDate.fromInvCode = null;
this.findMethod();
this.generateOrderDate.fromInvCode = null
this.findMethod()
},
//,
getBusTypeByInv() {
let query = {
code: this.generateOrderDate.invCode,
editType: 2 //
};
}
findByInvUser(query)
.then((response) => {
this.busTypeOptions = response.data || [];
this.busTypeOptions = response.data || []
})
.catch(() => {
});
})
},
//
getActionItem(action) {
for (let i = 0; i < this.busTypeOptions.length; i++) {
if (this.busTypeOptions[i].action == action) {
return this.busTypeOptions[i];
return this.busTypeOptions[i]
}
}
},
//
findMethod(query) {
this.fromOptions = [];
this.fromOptions = []
let cQuery = {
key: query,
corpType: 4,
outType: null,
page: 1,
limit: 20,
};
limit: 20
}
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
this.loading = false
this.fromOptions = response.data.list || []
})
.catch(() => {
this.loading = false;
});
},
this.loading = false
})
}
},
created() {
//
this.generateOrderDate.code = "";
this.generateOrderDate.orderType = this.viewType;
//
this.corpOrderIdDisabled = false;
let date = new Date();
this.generateOrderDate.createTime = parseTime(
date,
"{y}-{m}-{d} {h}:{i}:{s}"
);
this.generateOrderDate.corpOrderId =
parseTime(date, "{y}{m}{d}{h}{i}{s}") +
Math.ceil(Math.random() * 89 + 10);
this.generateOrderDate.deptCode = this.$store.getters.deptCode;
this.generateOrderDate.invCode = this.$store.getters.locInvCode;
this.findInvListByUser();
this.generateOrderDate.code = ''
this.generateOrderDate.orderType = this.viewType
//
this.corpOrderIdDisabled = false
let date = new Date()
this.generateOrderDate.createTime = parseTime(
date,
'{y}-{m}-{d} {h}:{i}:{s}'
)
this.generateOrderDate.corpOrderId =
parseTime(date, '{y}{m}{d}{h}{i}{s}') +
Math.ceil(Math.random() * 89 + 10)
this.generateOrderDate.deptCode = this.$store.getters.deptCode
this.generateOrderDate.invCode = this.$store.getters.locInvCode
this.findInvListByUser()
}
}
}
</script>

@ -172,6 +172,7 @@
<thrInvOrderGenerate
:generateOrderDate=thisData
:originTypes=originTypes
:sourceType = 2
:closeAddDialog="closeAddDialog">
</thrInvOrderGenerate>
</el-dialog>

Loading…
Cancel
Save