feat: 耗材补充修改
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row>
|
||||
<el-form-item label="类型">
|
||||
<el-radio-group :model-value="type">
|
||||
<el-radio-group :model-value="type" @change="tabChange">
|
||||
<el-radio-button value="in">入库</el-radio-button>
|
||||
<el-radio-button value="out">出库</el-radio-button>
|
||||
</el-radio-group>
|
||||
@@ -27,11 +27,11 @@
|
||||
@change="changeTypeEnum"
|
||||
>
|
||||
<el-option
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in purveyorList"
|
||||
:key="item.id"
|
||||
></el-option>
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
{{ queryForm.waitAmount }}
|
||||
</el-form-item>
|
||||
@@ -45,7 +45,7 @@
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
style="width: 220px"
|
||||
></el-date-picker>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -56,7 +56,7 @@
|
||||
v-model="queryForm.amountPayable"
|
||||
placeholder="请输入应收金额"
|
||||
style="width: 220px"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -65,7 +65,7 @@
|
||||
v-model="queryForm.actualPaymentAmount"
|
||||
placeholder="请输入实收金额"
|
||||
style="width: 220px"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -79,32 +79,24 @@
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
style="width: 220px"
|
||||
></el-date-picker>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批号">
|
||||
<el-input
|
||||
v-model="queryForm.batchNo"
|
||||
placeholder="请输入批号"
|
||||
style="width: 220px"
|
||||
></el-input>
|
||||
<el-input v-model="queryForm.batchNo" placeholder="请输入批号" style="width: 220px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="queryForm.remark"
|
||||
placeholder="请输入备注"
|
||||
style="width: 220px"
|
||||
></el-input>
|
||||
<el-input v-model="queryForm.remark" placeholder="请输入备注" style="width: 220px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="选择耗材">
|
||||
<div></div>
|
||||
<div />
|
||||
<el-button type="primary" @click="showHaocai">选择耗材</el-button>
|
||||
|
||||
<el-autocomplete
|
||||
@@ -112,9 +104,9 @@
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
value-key="conName"
|
||||
placeholder="耗材搜索"
|
||||
@select="handleSelect"
|
||||
style="width: 200px; margin-left: 20px"
|
||||
></el-autocomplete>
|
||||
@select="handleSelect"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -133,11 +125,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="进价">
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.price"
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
></el-input-number>
|
||||
<el-input-number v-model="scope.row.price" :min="0" controls-position="right" />
|
||||
<div class="tips" style="font-size: 16px">
|
||||
原价¥
|
||||
|
||||
@@ -154,12 +142,12 @@
|
||||
:placeholder="scope.row.unit"
|
||||
@change="changeUnit(scope.row)"
|
||||
>
|
||||
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit"></el-option>
|
||||
<el-option :label="scope.row.conUnit" :value="scope.row.conUnit" />
|
||||
<el-option
|
||||
v-if="scope.row.conUnitTwo"
|
||||
:label="scope.row.conUnitTwo"
|
||||
:value="scope.row.conUnitTwo"
|
||||
v-if="scope.row.conUnitTwo"
|
||||
></el-option>
|
||||
/>
|
||||
</el-select>
|
||||
<div class="tips"> </div>
|
||||
</template>
|
||||
@@ -172,7 +160,7 @@
|
||||
:step="1"
|
||||
step-strictly
|
||||
controls-position="right"
|
||||
></el-input-number>
|
||||
/>
|
||||
<div class="tips" style="font-size: 16px">
|
||||
{{ type == "in" ? "入库" : "出库" }}前:
|
||||
{{ returnStockNumber(scope.row, scope.row.number) }}
|
||||
@@ -195,7 +183,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitHandle" :loading="queryFormLoading">确定</el-button>
|
||||
<el-button type="primary" :loading="queryFormLoading" @click="submitHandle">确定</el-button>
|
||||
</div>
|
||||
<!-- 选择耗材 -->
|
||||
<ConsumableList ref="ConsumableList" @success="selectConsumable" />
|
||||
@@ -248,7 +236,7 @@ export default {
|
||||
{
|
||||
label: "商品入库",
|
||||
value: "goods",
|
||||
type: "purveyor",
|
||||
type: "out",
|
||||
},
|
||||
{
|
||||
label: "耗材入库",
|
||||
@@ -257,22 +245,6 @@ export default {
|
||||
},
|
||||
],
|
||||
shopTypesActive: 0,
|
||||
shopTypes: [
|
||||
{
|
||||
label: "供应商入库",
|
||||
value: "purveyor",
|
||||
},
|
||||
{
|
||||
label: "其他入库",
|
||||
value: "purchase",
|
||||
},
|
||||
],
|
||||
shopTypes2: [
|
||||
{
|
||||
label: "供应商入库",
|
||||
value: "purveyor",
|
||||
},
|
||||
],
|
||||
resetForm: "",
|
||||
queryFormLoading: false,
|
||||
queryForm: {
|
||||
@@ -314,11 +286,6 @@ export default {
|
||||
timeout: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.type = this.$route.query.type || "in";
|
||||
this.resetForm = { ...this.queryForm };
|
||||
this.tbShopPurveyorGet();
|
||||
},
|
||||
computed: {
|
||||
amountPayable() {
|
||||
if (!this.tableData.list.length) return 0;
|
||||
@@ -333,6 +300,11 @@ export default {
|
||||
this.queryForm.amountPayable = newval;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.type = this.$route.query.type || "in";
|
||||
this.resetForm = { ...this.queryForm };
|
||||
this.tbShopPurveyorGet();
|
||||
},
|
||||
methods: {
|
||||
changeUnit(row) {
|
||||
row.price = this.returnPrice(row, row.originPrice);
|
||||
@@ -398,12 +370,13 @@ export default {
|
||||
},
|
||||
|
||||
// 切换入库内容
|
||||
tabChange(value, type) {
|
||||
this.shopTypesActive = type == "in" ? 0 : 1;
|
||||
tabChange(value) {
|
||||
this.shopTypesActive = value == "in" ? 0 : 1;
|
||||
this.inTabValue = value;
|
||||
this.type = value;
|
||||
this.resetHandle();
|
||||
this.$refs.shopList.reset(); //清除选项
|
||||
this.$refs.ConsumableList.reset(); //清除选项
|
||||
// this.$refs.shopList.reset(); //清除选项
|
||||
// this.$refs.ConsumableList.reset(); //清除选项
|
||||
},
|
||||
// 切换类型
|
||||
changeTypeEnum(index) {
|
||||
@@ -494,7 +467,8 @@ export default {
|
||||
resetHandle() {
|
||||
this.showResult = false;
|
||||
this.queryForm = { ...this.resetForm };
|
||||
this.queryForm.type = this.inTabs.find((item) => item.value == this.inTabValue).type;
|
||||
console.log(this.inTabs, this.inTabValue);
|
||||
this.queryForm.type = this.inTabs.find((item) => item.type == this.inTabValue).type;
|
||||
this.tableData.list = [];
|
||||
this.$refs.queryForm.resetFields();
|
||||
},
|
||||
@@ -524,4 +498,4 @@ export default {
|
||||
|
||||
.app-container {
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user