仓库部门单据类型相关修改

prod
anthonywj 2 years ago
parent d72fc659f3
commit 49b4269e1b

@ -9,11 +9,40 @@ export function getDetailCodes(query) {
}); });
} }
//获取业务明细
export function getDetailBizs(query) { export function getDetailBizs(query) {
return axios({ return axios({
url: "/udiwms/inout/order/draft/detailBiz", url: "/udiwms/inout/order/draft/biz",
method: "get", method: "get",
params: query params: query
}); });
} }
//业务明细添加产品
export function addBizProduct(query) {
return axios({
url: "/udiwms/inout/order/addBizProduct",
method: "post",
data: query
});
}
export function updateBizProduct(query) {
return axios({
url: "/udiwms/inout/order/updateBizProduct",
method: "post",
data: query
});
}
export function delBizProduct(query) {
return axios({
url: "/udiwms/inout/order/delBizProduct",
method: "post",
data: query
});
}

@ -123,9 +123,11 @@
.el-button [class*="el-icon-"] + span { .el-button [class*="el-icon-"] + span {
margin-left: 1px; margin-left: 1px;
} }
td { td {
padding: 0px; padding: 0px;
} }
tr.current-row > td, tr.current-row > td,
.el-table__body tr:hover > td { .el-table__body tr:hover > td {
background: #ecd1cf; background: #ecd1cf;
@ -330,7 +332,7 @@
width: 100%; width: 100%;
} }
.el-divider{ .el-divider {
margin: 0px 0px 15px 0px; margin: 0px 0px 15px 0px;
background: 0 0; background: 0 0;
border-top: 1px solid #E6EBF5; border-top: 1px solid #E6EBF5;

@ -512,7 +512,7 @@ export default {
addCodeSubmit(tQuery) { addCodeSubmit(tQuery) {
addOrderWeb(tQuery).then((response) => { addOrderWeb(tQuery).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.idQuery.id = response.data.orderId; this.idQuery.billNo = response.data.orderId;
if (response.data.errMsg != null) { if (response.data.errMsg != null) {
this.$alert(response.data.errMsg, '提示', { this.$alert(response.data.errMsg, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -529,13 +529,13 @@ export default {
} else { } else {
if (response.code == 502) { if (response.code == 502) {
this.curRow = response.data; this.curRow = response.data;
this.idQuery.id = this.curRow.orderId; this.idQuery.billNo = this.curRow.orderId;
this.refreshCodesPanel(); this.refreshCodesPanel();
this.selectRlTitle = response.message; this.selectRlTitle = response.message;
this.bindRl(response.data); this.bindRl(response.data);
} else if (response.code == 503) { } else if (response.code == 503) {
this.curRow = response.data; this.curRow = response.data;
this.idQuery.id = this.curRow.orderId; this.idQuery.billNo = this.curRow.orderId;
this.refreshCodesPanel(); this.refreshCodesPanel();
this.selectUnitTitle = response.message; this.selectUnitTitle = response.message;
this.handleUnitClick(response.data); this.handleUnitClick(response.data);
@ -592,6 +592,7 @@ export default {
refreshCodesPanel() { refreshCodesPanel() {
this.isCodeAlive = false; this.isCodeAlive = false;
this.idQuery =
this.$nextTick(() => { // this.$nextTick(() => { //
this.isCodeAlive = true this.isCodeAlive = true
}) })
@ -644,7 +645,7 @@ export default {
return; return;
} }
let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData))); let tQuery = Object.assign(JSON.parse(JSON.stringify(this.formData)));
tQuery.orderId = this.idQuery.id; tQuery.orderId = this.idQuery.billNo;
tQuery.actDate = parseTime(this.formData.actDate, '{y}-{m}-{d} {h}:{i}:{s}'); tQuery.actDate = parseTime(this.formData.actDate, '{y}-{m}-{d} {h}:{i}:{s}');
saveOrderWeb(tQuery).then((response) => { saveOrderWeb(tQuery).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {

@ -4,6 +4,7 @@
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
ref="mainTable"
@click.native.stop="selectProductFunction()" @click.native.stop="selectProductFunction()"
style="margin: 0px 60px 10px auto; height: 35px" style="margin: 0px 60px 10px auto; height: 35px"
:loading="loading" :loading="loading"
@ -18,7 +19,7 @@
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column width="150" <el-table-column width="150"
label="产品通用名" label="产品通用名"
prop="productName" prop="coName"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column width="150" <el-table-column width="150"
@ -28,11 +29,11 @@
></el-table-column> ></el-table-column>
<el-table-column width="150" label="批次号"> <el-table-column width="150" label="批次号">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.batchNo" <el-input v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')" @input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef' ref='inputBatchNoRef'
placeholder="请输入批次号" style="width: 80%"></el-input> placeholder="请输入批次号"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="生产日期(yyMMdd)"> <el-table-column width="180" label="生产日期(yyMMdd)">
@ -55,48 +56,64 @@
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" label="单据数量"> <el-table-column width="120" label="单据数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.count" <el-input v-model="scope.row.count"
placeholder="请输入数量" style="width: 80%"
type='number' type='number'
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
oninput="value=value.replace(/[^\d]/g,'')"></el-input> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="80"
label="扫码数量"
prop="reCount"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150" label="价格"> <el-table-column width="150" label="价格">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="small" v-model="scope.row.price" <el-input v-model="scope.row.price"
type='number' type='number'
:disabled="scope.row.index !== selectedIndex" :disabled="scope.row.index !== selectedIndex"
placeholder="请输入价格" style="width: 80%" placeholder="请输入价格"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="250" <el-table-column width="160"
label="注册/备案凭证号" label="注册/备案凭证号"
prop="zczbhhzbapzbh" prop="certCode"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-input size="small" v-model="scope.row.zczbhhzbapzbh" <!-- <el-input size="small" v-model="scope.row.certCode"-->
:disabled="scope.row.index !== selectedIndex" <!-- :disabled="scope.row.index !== selectedIndex"-->
placeholder="请输入注册/备案凭证号" style="width: 100%" <!-- placeholder="请输入注册/备案凭证号" style="width: 100%"-->
></el-input> <!-- ></el-input>-->
</template> <!-- </template>-->
</el-table-column> </el-table-column>
<el-table-column width="150" <el-table-column width="150"
label="生产厂家" label="生产厂家"
prop="ylqxzcrbarmc" prop="manufacturer"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
type="text"
size="small"
v-if="scope.row.index == selectedIndex"
@click.stop="true"
@click.native="saveChange(scope.row)"
>保存
</el-button
>
<el-button <el-button
type="text" type="text"
size="small" size="small"
:disabled="scope.row.index === selectedIndex" v-if="scope.row.index != selectedIndex"
@click.stop="true" @click.stop="true"
@click.native="rowChange(scope.row)" @click.native="rowChange(scope.row)"
>编辑 >编辑
@ -114,7 +131,7 @@
type="text" type="text"
size="small" size="small"
@click.stop="true" @click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)" @click.native="deleteDetail(scope.row)"
>删除 >删除
</el-button </el-button
> >
@ -158,7 +175,7 @@
<script> <script>
import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct"; import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
// import dialogInvProduct from "../inventory/DialogInvProduct" // import dialogInvProduct from "../inventory/DialogInvProduct"
import {getDetailBizs} from "@/api/inout/orderDetailCode"; import {addBizProduct, getDetailBizs, updateBizProduct, delBizProduct} from "@/api/inout/orderDetailCode";
export default { export default {
name: "IoCreateOrderBizDetail", name: "IoCreateOrderBizDetail",
@ -183,6 +200,7 @@ export default {
iCount: 0, iCount: 0,
selectProductVisible: false, selectProductVisible: false,
thisData: {}, thisData: {},
selectedIndex: null,
}; };
}, },
components: { components: {
@ -196,6 +214,7 @@ export default {
getDetailBizs(this.query) // getDetailBizs(this.query) //
.then((response) => { .then((response) => {
this.detailList = response.data.list || []; this.detailList = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
this.loading = false; this.loading = false;
}) })
@ -214,6 +233,8 @@ export default {
closeDialog(rData) { closeDialog(rData) {
this.selectProductVisible = false; this.selectProductVisible = false;
this.selectInvProductVisible = false; this.selectInvProductVisible = false;
this.idQuery = rData;
this.getOrderDetails();
}, },
rowStyle({row, rowIndex}) { rowStyle({row, rowIndex}) {
@ -230,7 +251,70 @@ export default {
selectProductFunction() { selectProductFunction() {
this.selectProductVisible = true; this.selectProductVisible = true;
this.thisData = this.idQuery;
},
saveChange(row) {
updateBizProduct(row)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
}, },
copyDetail(row) {
let data = {
relId: row.bindRlFk,
zczbhhzbapzbh: row.zczbhhzbapzbh,
orderEntity: this.idQuery,
}
this.loading = true;
addBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.getOrderDetails();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
deleteDetail(row) {
let data = {
id: row.id,
}
this.loading = true;
delBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.getOrderDetails();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
}
} }
, ,
filters: {} filters: {}
@ -243,12 +327,21 @@ export default {
} }
, ,
created() { created() {
this.getOrderDetails();
} }
, ,
} }
; ;
</script> </script>
<style scoped> <style scoped>
.el-table_fixed, el-table__fixed-right {
height: 80% !important;
}
.el-table__fixed-body-wrapper {
height: 80% !important;
}
.ao-text { .ao-text {
width: 100%; width: 100%;

@ -21,7 +21,7 @@
<el-table-column label="实际数量" width="80" prop="reCount" show-overflow-tooltip></el-table-column> <el-table-column label="实际数量" width="80" prop="reCount" show-overflow-tooltip></el-table-column>
<el-table-column label="价格" width="150" prop="price" show-overflow-tooltip></el-table-column> <el-table-column label="价格" width="150" prop="price" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" width="150" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column> <el-table-column label="生产厂家" width="150" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="150" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> <el-table-column label="注册/备案凭证号" width="150" prop="certCode" show-overflow-tooltip></el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<pagination <pagination

@ -307,7 +307,6 @@ export default {
fromCorp: "", fromCorp: "",
}, },
idQuery: { idQuery: {
id: "",
}, },
storageList: [], storageList: [],
subInvList: [], subInvList: [],

@ -141,6 +141,7 @@
<script> <script>
import {getUdiInfos} from "@/api/basic/product/udiRelevance"; import {getUdiInfos} from "@/api/basic/product/udiRelevance";
import {addBizProduct} from "@/api/inout/orderDetailCode";
export default { export default {
name: "stockOrderNewSelectProduct", name: "stockOrderNewSelectProduct",
@ -262,33 +263,27 @@ export default {
}, },
combine() { combine() {
let ids = [];
let data = { let data = {
relId: this.multipleSelection.rlId, relId: this.currentRow.id,
supId: this.multipleSelection.customerId supId: this.currentRow.customerId,
zczbhhzbapzbh: this.currentRow.zczbhhzbapzbh,
orderEntity: this.data,
} }
ids.push(data);
this.loading = true; this.loading = true;
let tQuery = { addBizProduct(data)
datas: ids, .then((response) => {
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh, this.loading = false;
}; if (response.code === 20000) {
getStockOrderDetailInstrumentById(tQuery).then((response) => { this.closeDialog(response.data);
this.loading = false; } else {
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message); this.$message.error(response.message);
} }
}).catch(() => { })
this.loading = false; .catch(() => {
}); this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
}, },
}, },

@ -85,7 +85,7 @@
<el-button <el-button
type="text" type="text"
:disabled="!configParms.basicInv" :disabled="!configParms.basicInv"
@click.native.stop="handleSubDel(scope.row)" @click.native.stop="handleDelInv(scope.row)"
>删除 >删除
</el-button </el-button
> >
@ -356,7 +356,7 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
}, },
isShow:null, isShow: null,
loading: true, loading: true,
list: [], list: [],
isExpandAll: true, isExpandAll: true,
@ -444,10 +444,10 @@ export default {
this.formName = formName; this.formName = formName;
if (formName === "edit") { if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data)); this.subData = JSON.parse(JSON.stringify(data));
this.isShow=true; this.isShow = true;
} else if (formName === "add") { } else if (formName === "add") {
this.subData = {}; this.subData = {};
this.isShow=false; this.isShow = false;
} }
this.subFormVisible = true; this.subFormVisible = true;
this.getSubThrsysDetailData(); this.getSubThrsysDetailData();
@ -631,7 +631,6 @@ export default {
}, },
getBussinessType(val, obj) { getBussinessType(val, obj) {
if (val != null) { if (val != null) {
this.bussinessTypeQuery.page = val; this.bussinessTypeQuery.page = val;
@ -686,6 +685,35 @@ export default {
}, },
handleDelInv(row) {
if (row.id) {
this.$confirm("确认删除该仓库吗?", "提示", {
type: "warning",
})
.then(() => {
this.deleteLoading = true;
let para = {id: row.id};
deleteSubWarehouse(para)
.then((response) => {
this.deleteLoading = false;
if (response.code !== 20000) {
this.$message.error(response.message);
return false;
}
this.$message.success("删除成功");
this.loadSubData(row.parentId);
})
.catch(() => {
this.deleteLoading = false;
});
})
.catch(() => {
this.$message.info("取消删除");
});
}
},
}, },
mounted() { mounted() {
}, },

Loading…
Cancel
Save