feat: 0531增加是否需要扫码字段

演示数据2.0
chenhc 10 months ago
parent 464692e1d4
commit 7320ff9035

@ -891,24 +891,23 @@
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<!-- <div class="text item">--> <div class="text item">
<!-- <div class="itemTag">--> <div class="itemTag">
<!-- <span>是否寄售:&nbsp;</span>--> <span>是否需要扫码:&nbsp;</span>
<!-- </div>--> </div>
<!-- <el-select--> <el-select
<!-- v-model="editQuery.isAdavence"--> v-model="editQuery.requireScanCode"
<!-- disabled--> disabled
<!-- style="width: 65%"--> style="width: 65%"
<!-- size="small"--> size="small"
<!-- >--> >
<!-- <el-option label="是" :value="true"></el-option>--> <el-option label="是" :value=1></el-option>
<!-- <el-option label="否" :value="false"></el-option>--> <el-option label="否" :value=0></el-option>
<!-- <el-option label="否" :value="null"></el-option>--> </el-select>
<!-- </el-select>--> </div>
<!-- </div>--> </el-col>
</el-col> </el-row>
</el-row>
</el-collapse-item> </el-collapse-item>
<el-collapse-item name="2"> <el-collapse-item name="2">

@ -76,7 +76,29 @@
</el-col> </el-col>
<el-col :span="11" class="el-col"> <el-col :span="11" class="el-col">
<el-form-item label="分类编码:" prop="flbm"> <el-form-item label="分类编码:" prop="flbm">
<el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></el-input> <el-select
size="small"
v-model="newProductData.flbm"
filterable
remote
clearable="true"
style="width: 90%"
reserve-keyword
placeholder="请选择"
:remote-method="classifySearch"
:loading="loading"
@change="classifyChange()"
>
<el-option
v-for="item in classifyList"
:key="item.code"
:label="item.name"
:value="item.code">
<span>{{ item.code }}</span>
<span>{{ item.name }}</span>
</el-option>
</el-select>
<!-- <el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></el-input>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -148,6 +170,7 @@
<script> <script>
import {getYbHcflDetail,addProduct} from '@/api/basic/product/udiRelevance' import {getYbHcflDetail,addProduct} from '@/api/basic/product/udiRelevance'
import {filterClassify} from "@/api/purchase/classifyCode"
export default { export default {
name: 'productAdd', name: 'productAdd',
@ -178,12 +201,31 @@ export default {
cpms: null, cpms: null,
attributeType: null, attributeType: null,
hcType: null, hcType: null,
requireScanCode: null,
}, },
thirdSys: [] thirdSys: [],
classifyList: [],
} }
}, },
methods: { methods: {
classifyChange(){
this.editQuery.requireScanCode = this.classifyList.find(item => item.code == this.editQuery.flbm).requireScanCode;
},
classifySearch(key) {
let query = {
key: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
getYbHcData(){ getYbHcData(){
let query = { let query = {
specificationCode: this.newProductData.ybbm specificationCode: this.newProductData.ybbm

@ -328,6 +328,35 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="分类编码:" prop="require">
<el-select
v-model="editQuery.flbm"
filterable
remote
clearable="true"
style="width: 80%"
reserve-keyword
placeholder="请选择"
:remote-method="classifySearch"
:loading="loading"
@change="classifyChange()"
>
<el-option
v-for="item in classifyList"
:key="item.code"
:label="item.name"
:value="item.code">
<span>{{ item.code }}</span>
<span>{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-card> </el-card>
@ -352,6 +381,23 @@
</el-row> </el-row>
<el-divider direction="horizontal"></el-divider> <el-divider direction="horizontal"></el-divider>
<el-row>
<el-col span="5">
<span class="sptext">是否需要扫码</span>
</el-col>
<el-divider direction="vertical"></el-divider>
<el-col span="5">
<el-select v-model="editQuery.requireScanCode" style="width: 65%" placeholder="状态" clearable>
<el-option label="是" :value=1></el-option>
<el-option label="否" :value=0></el-option>
</el-select>
</el-col>
<el-divider direction="vertical"></el-divider>
<el-col span="13">
<span class="sptext">是否需要扫码</span>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row> <el-row>
<el-col span="5"> <el-col span="5">
@ -705,6 +751,7 @@ import Treeselect from "@riophae/vue-treeselect";
import {getListMenu, getOneName} from '@/api/basic/basicHospType' import {getListMenu, getOneName} from '@/api/basic/basicHospType'
import {getSupComapnys} from "@/api/purchase/supCompany"; import {getSupComapnys} from "@/api/purchase/supCompany";
import {getHslbs} from "@/api/thrsys/thrHsfl"; import {getHslbs} from "@/api/thrsys/thrHsfl";
import {filterClassify} from "@/api/purchase/classifyCode"
export default { export default {
@ -766,6 +813,7 @@ export default {
measname: null, measname: null,
nameCode: null nameCode: null
}, },
classifyList: [],
} }
}, },
components: { components: {
@ -789,8 +837,26 @@ export default {
if (this.editQuery.basicPrductRemak8 != null) { if (this.editQuery.basicPrductRemak8 != null) {
this.findHsflMethod(this.editQuery.basicPrductRemak8); this.findHsflMethod(this.editQuery.basicPrductRemak8);
} }
this.classifySearch()
}, },
methods: { methods: {
classifyChange(){
this.editQuery.requireScanCode = this.classifyList.find(item => item.code == this.editQuery.flbm).requireScanCode;
},
classifySearch(key) {
let query = {
key: key,
}
filterClassify(query)
.then(response => {
this.loading = false;
this.classifyList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.classifyList = [];
});
},
getYbHcData(){ getYbHcData(){
let query = { let query = {
specificationCode: this.editQuery.ybbm specificationCode: this.editQuery.ybbm

Loading…
Cancel
Save