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

prod
anthonywj 2 years ago
parent d72fc659f3
commit 49b4269e1b

@ -9,11 +9,40 @@ export function getDetailCodes(query) {
});
}
//获取业务明细
export function getDetailBizs(query) {
return axios({
url: "/udiwms/inout/order/draft/detailBiz",
url: "/udiwms/inout/order/draft/biz",
method: "get",
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 {
margin-left: 1px;
}
td {
padding: 0px;
}
tr.current-row > td,
.el-table__body tr:hover > td {
background: #ecd1cf;
@ -330,7 +332,7 @@
width: 100%;
}
.el-divider{
.el-divider {
margin: 0px 0px 15px 0px;
background: 0 0;
border-top: 1px solid #E6EBF5;

@ -512,7 +512,7 @@ export default {
addCodeSubmit(tQuery) {
addOrderWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.idQuery.id = response.data.orderId;
this.idQuery.billNo = response.data.orderId;
if (response.data.errMsg != null) {
this.$alert(response.data.errMsg, '提示', {
confirmButtonText: '确定',
@ -529,13 +529,13 @@ export default {
} else {
if (response.code == 502) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.idQuery.billNo = this.curRow.orderId;
this.refreshCodesPanel();
this.selectRlTitle = response.message;
this.bindRl(response.data);
} else if (response.code == 503) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.idQuery.billNo = this.curRow.orderId;
this.refreshCodesPanel();
this.selectUnitTitle = response.message;
this.handleUnitClick(response.data);
@ -592,6 +592,7 @@ export default {
refreshCodesPanel() {
this.isCodeAlive = false;
this.idQuery =
this.$nextTick(() => { //
this.isCodeAlive = true
})
@ -644,7 +645,7 @@ export default {
return;
}
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}');
saveOrderWeb(tQuery).then((response) => {
if (response.code === 20000) {

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

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

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

@ -85,7 +85,7 @@
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="handleSubDel(scope.row)"
@click.native.stop="handleDelInv(scope.row)"
>删除
</el-button
>
@ -356,7 +356,7 @@ export default {
page: 1,
limit: 10,
},
isShow:null,
isShow: null,
loading: true,
list: [],
isExpandAll: true,
@ -444,10 +444,10 @@ export default {
this.formName = formName;
if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data));
this.isShow=true;
this.isShow = true;
} else if (formName === "add") {
this.subData = {};
this.isShow=false;
this.isShow = false;
}
this.subFormVisible = true;
this.getSubThrsysDetailData();
@ -631,7 +631,6 @@ export default {
},
getBussinessType(val, obj) {
if (val != null) {
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() {
},

Loading…
Cancel
Save