|
@@ -504,6 +504,16 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="所属仓库" prop="warehouseCode">
|
|
|
+ <el-select v-model="warehouseModel" placeholder="请选择仓库" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in warehouseOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.warehouseName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="国药准字" v-if="form.productType==2" prop="prescribeCode">
|
|
|
<el-input v-model="form.prescribeCode" placeholder="请输入国药准字" />
|
|
|
</el-form-item>
|
|
@@ -565,6 +575,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import Editor from '@/components/Editor/wang';
|
|
|
import Material from '@/components/Material'
|
|
|
import singleImg from '@/components/Material/single'
|
|
|
+import {listWarehousesAll} from "../../../api/store/warehouses";
|
|
|
export default {
|
|
|
name: "StoreProduct",
|
|
|
components: {
|
|
@@ -598,6 +609,8 @@ export default {
|
|
|
url: process.env.VUE_APP_BASE_API + "/store/storeProduct/importData"
|
|
|
},
|
|
|
productTuiCateOptions:[],
|
|
|
+ // 仓库列表
|
|
|
+ warehouseOptions: [],
|
|
|
showIput: false,
|
|
|
createBnt:true,
|
|
|
// 规格数据
|
|
@@ -711,6 +724,19 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ warehouseModel:{
|
|
|
+ get(){
|
|
|
+ return this.form.warehouseId;
|
|
|
+ },
|
|
|
+ set(newVal){
|
|
|
+ this.form.warehouseId = newVal;
|
|
|
+ // 根据id找出code
|
|
|
+ let option = this.warehouseOptions.filter(e=>e.id===newVal)[0];
|
|
|
+ this.form.warehouseCode = option.warehouseCode;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getDicts("store_product_tui_cate").then((response) => {
|
|
|
this.productTuiCateOptions = response.data;
|
|
@@ -736,8 +762,18 @@ export default {
|
|
|
});
|
|
|
this.getTreeselect();
|
|
|
this.getList();
|
|
|
+
|
|
|
+ this.loadWarehouseOptions();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 加载仓库数据
|
|
|
+ loadWarehouseOptions(){
|
|
|
+ listWarehousesAll({
|
|
|
+ isActive: 1
|
|
|
+ }).then((response) => {
|
|
|
+ this.warehouseOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 提交上传文件
|
|
|
submitFileForm() {
|
|
|
this.$refs.upload.submit();
|
|
@@ -959,7 +995,9 @@ export default {
|
|
|
prescribeSpec: null,
|
|
|
prescribeFactory: null,
|
|
|
prescribeName: null,
|
|
|
- isDisplay:"1"
|
|
|
+ isDisplay:"1",
|
|
|
+ warehouseCode: null,
|
|
|
+ warehouseId: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
this.oneFormValidate = [
|