|
|
|
@ -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%;
|
|
|
|
|