|
@@ -1,8 +1,13 @@
|
|
|
<!-- 批量新增 -->
|
|
|
<script>
|
|
|
import useColumns from "./column";
|
|
|
-import {addChangeList, getMaterialDetails, getChangeDetails, editChangeList,importInner} from '@/api/changeApply/basic';
|
|
|
-
|
|
|
+import {
|
|
|
+ addChangeList,
|
|
|
+ getMaterialDetails,
|
|
|
+ getChangeDetails,
|
|
|
+ editChangeList,
|
|
|
+ importInner,
|
|
|
+} from "@/api/changeApply/basic";
|
|
|
|
|
|
export default {
|
|
|
name: "AddChangeOrders",
|
|
@@ -23,10 +28,10 @@ export default {
|
|
|
ElPopoverTreeSelect: () =>
|
|
|
import("@/components/popover-tree-select/index.vue"),
|
|
|
BatchImport: () => import("@/components/BatchImport/index.vue"),
|
|
|
+ ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
-
|
|
|
const {
|
|
|
TabColumns,
|
|
|
TableColumns,
|
|
@@ -42,7 +47,7 @@ export default {
|
|
|
return {
|
|
|
width: "100%",
|
|
|
visible: false,
|
|
|
- loading:false,
|
|
|
+ loading: false,
|
|
|
rules,
|
|
|
params,
|
|
|
tabName: tabName,
|
|
@@ -63,8 +68,8 @@ export default {
|
|
|
},
|
|
|
set() {},
|
|
|
},
|
|
|
- materialInfo:{
|
|
|
- get(){
|
|
|
+ materialInfo: {
|
|
|
+ get() {
|
|
|
const { materialBasic } = this.params;
|
|
|
this.params.materialBasic = materialBasic.map((item, index) => ({
|
|
|
...item,
|
|
@@ -75,33 +80,30 @@ export default {
|
|
|
materialBasic: this.params.materialBasic.filter(
|
|
|
({ delFlag }) => delFlag !== "2"
|
|
|
),
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
- set(){},
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- watch: {
|
|
|
-
|
|
|
+ set() {},
|
|
|
+ },
|
|
|
},
|
|
|
+ watch: {},
|
|
|
methods: {
|
|
|
- setVisible(prop){
|
|
|
+ setVisible(prop) {
|
|
|
this.visible = prop;
|
|
|
},
|
|
|
- beforeOpen(){
|
|
|
- if(this.addType === 'add'){
|
|
|
- let {name,nickName} = this.$store.state.user;
|
|
|
+ beforeOpen() {
|
|
|
+ if (this.addType === "add") {
|
|
|
+ let { name, nickName } = this.$store.state.user;
|
|
|
this.params.createBy = name;
|
|
|
this.params.createByName = nickName;
|
|
|
- this.params.createTime = new Date().Format('yyyy-MM-dd HH:mm:ss');
|
|
|
+ this.params.createTime = new Date().Format("yyyy-MM-dd HH:mm:ss");
|
|
|
this.params.updateBy = name;
|
|
|
this.params.updateByName = nickName;
|
|
|
- this.params.updateTime = new Date().Format('yyyy-MM-dd HH:mm:ss');
|
|
|
+ this.params.updateTime = new Date().Format("yyyy-MM-dd HH:mm:ss");
|
|
|
// this.params.approver = name;
|
|
|
- this.params.applicationTime = new Date().Format('yyyy-MM-dd HH:mm:ss');
|
|
|
- this.params.status = '0';
|
|
|
- console.log(this.$store.state.user,'user');
|
|
|
- this.params.orgName = '德荣集团';
|
|
|
+ this.params.applicationTime = new Date().Format("yyyy-MM-dd HH:mm:ss");
|
|
|
+ this.params.status = "0";
|
|
|
+ console.log(this.$store.state.user, "user");
|
|
|
+ this.params.orgName = "德荣集团";
|
|
|
// this.useRowAdd(this.tabName);
|
|
|
}
|
|
|
},
|
|
@@ -114,10 +116,9 @@ export default {
|
|
|
|
|
|
let { code, data } = await getChangeDetails(prop.id);
|
|
|
|
|
|
- if(code == 200){
|
|
|
+ if (code == 200) {
|
|
|
this.params = data;
|
|
|
}
|
|
|
-
|
|
|
} catch (err) {
|
|
|
// catch
|
|
|
console.error(err);
|
|
@@ -139,19 +140,18 @@ export default {
|
|
|
],
|
|
|
} = useColumns();
|
|
|
this.visible = false;
|
|
|
- this.$emit('success');
|
|
|
+ this.$emit("success");
|
|
|
this.tabName = tabName;
|
|
|
this.params = this.$init.params([...TabColumns, ...TableColumns]);
|
|
|
},
|
|
|
//
|
|
|
async useRowAdd(prop) {
|
|
|
-
|
|
|
const { TableColumns } = this.TabColumns.find(
|
|
|
({ item: { key } }) => key === prop
|
|
|
);
|
|
|
this.params[prop].push({
|
|
|
delFlag: "0",
|
|
|
- materialClassifyId:null,
|
|
|
+ materialClassifyId: null,
|
|
|
...this.$init.params(TableColumns),
|
|
|
});
|
|
|
},
|
|
@@ -165,30 +165,31 @@ export default {
|
|
|
this.params[prop].splice($index, 1);
|
|
|
}
|
|
|
if (addType === "edit") {
|
|
|
- this.params[prop] = this.params[prop].map((item, index) => ({
|
|
|
- ...item,
|
|
|
- delFlag: index === $index ? "2" : item.delFlag,
|
|
|
- })).filter(item =>( item.id || (!item.id && item.delFlag === '0')) )
|
|
|
- ;
|
|
|
+ this.params[prop] = this.params[prop]
|
|
|
+ .map((item, index) => ({
|
|
|
+ ...item,
|
|
|
+ delFlag: index === $index ? "2" : item.delFlag,
|
|
|
+ }))
|
|
|
+ .filter((item) => item.id || (!item.id && item.delFlag === "0"));
|
|
|
}
|
|
|
},
|
|
|
- handleSubmitValidate(prop,cb){
|
|
|
-
|
|
|
+ handleSubmitValidate(prop, cb) {
|
|
|
this.$refs[prop].$refs[prop].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
|
|
|
- let validList = this.params['materialBasic'].filter(item => item.delFlag === '0');
|
|
|
+ let validList = this.params["materialBasic"].filter(
|
|
|
+ (item) => item.delFlag === "0"
|
|
|
+ );
|
|
|
|
|
|
- if(validList.length){
|
|
|
+ if (validList.length) {
|
|
|
await cb();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.$notify.error({
|
|
|
- message:'物料信息不能不为空!'
|
|
|
- })
|
|
|
+ message: "物料信息不能不为空!",
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
} catch (err) {
|
|
|
// catch
|
|
|
console.error(err);
|
|
@@ -203,51 +204,45 @@ export default {
|
|
|
},
|
|
|
//
|
|
|
async useSubmit(prop) {
|
|
|
- console.log(this.params,'this.params');
|
|
|
- this.handleSubmitValidate(prop,async()=>{
|
|
|
+ let params = _.cloneDeep(this.params);
|
|
|
|
|
|
+ this.handleSubmitValidate(prop, async () => {
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
- const {code,msg} = await addChangeList(this.params);
|
|
|
-
|
|
|
- if(code == 200){
|
|
|
+ const { code, msg } = await addChangeList(params);
|
|
|
|
|
|
+ if (code == 200) {
|
|
|
this.hide();
|
|
|
this.$notify.success({
|
|
|
title: msg,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- } catch (error) {}
|
|
|
- finally{
|
|
|
+ } catch (error) {
|
|
|
+ } finally {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// await;
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
- async handelImport(fileList){
|
|
|
-
|
|
|
+ async handelImport(fileList) {
|
|
|
try {
|
|
|
-
|
|
|
let formData = new FormData();
|
|
|
|
|
|
- formData.append('file',fileList[0].raw);
|
|
|
+ formData.append("file", fileList[0].raw);
|
|
|
|
|
|
this.$modal.loading("正在上传文件,请稍候...");
|
|
|
|
|
|
- let {code,data} = await importInner(formData);
|
|
|
-
|
|
|
- if(code == 200) {
|
|
|
+ let { code, data } = await importInner(formData);
|
|
|
|
|
|
+ if (code == 200) {
|
|
|
// let size = 20;
|
|
|
// let num = 1;
|
|
|
// let total = Math.ceil(data.length / size);
|
|
|
|
|
|
// let resultData = [...data];
|
|
|
-
|
|
|
+
|
|
|
// let intervalPush = setInterval(()=>{
|
|
|
|
|
|
// if(num > total) clearInterval(intervalPush);
|
|
@@ -255,7 +250,7 @@ export default {
|
|
|
// resultData.slice(size*(num-1), (size*num) ).forEach(item =>{
|
|
|
|
|
|
// this.params['materialBasic'].push(item);
|
|
|
- this.params['materialBasic'].push(...data);
|
|
|
+ this.params["materialBasic"].push(...data);
|
|
|
|
|
|
// })
|
|
|
|
|
@@ -263,76 +258,68 @@ export default {
|
|
|
|
|
|
// },200);
|
|
|
|
|
|
- let {setVisible} = this.$refs.batchImport;
|
|
|
+ let { setVisible } = this.$refs.batchImport;
|
|
|
|
|
|
setVisible(false);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
} catch (error) {
|
|
|
-
|
|
|
- }finally{
|
|
|
+ } finally {
|
|
|
this.$modal.closeLoading();
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
|
|
|
- async handleTemDownload(){
|
|
|
-
|
|
|
- this.download('/material/change/downloadInner',{}, `变更单物料信息模板${new Date().getTime()}.xlsx`);
|
|
|
+ async handleTemDownload() {
|
|
|
+ this.download(
|
|
|
+ "/material/change/downloadInner",
|
|
|
+ {},
|
|
|
+ `变更单物料信息模板${new Date().getTime()}.xlsx`
|
|
|
+ );
|
|
|
},
|
|
|
// 批号及库存状态管理
|
|
|
- changeIsInventoryStatus(row){
|
|
|
-
|
|
|
- if(row.isInventoryStatus === '2'){
|
|
|
+ changeIsInventoryStatus(row) {
|
|
|
+ if (row.isInventoryStatus === "2") {
|
|
|
+ row.expiryDateManagerment = "2";
|
|
|
|
|
|
- row.expiryDateManagerment = '2';
|
|
|
-
|
|
|
- row.serialNoManager = '2';
|
|
|
+ row.serialNoManager = "2";
|
|
|
}
|
|
|
this.changeExpiryDateManagerment(row);
|
|
|
},
|
|
|
- changeExpiryDateManagerment(row){
|
|
|
-
|
|
|
- if(row.expiryDateManagerment === '2'){
|
|
|
-
|
|
|
- row.usefulLife = '';
|
|
|
+
|
|
|
+ changeExpiryDateManagerment(row) {
|
|
|
+ if (row.expiryDateManagerment === "2") {
|
|
|
+ row.usefulLife = "";
|
|
|
}
|
|
|
},
|
|
|
// 物料编码
|
|
|
- materialCodeChange( rows, props){
|
|
|
- console.log(rows, props,'rows, props');
|
|
|
+ materialCodeChange(rows, props) {
|
|
|
+ console.log(rows, props, "rows, props");
|
|
|
},
|
|
|
-
|
|
|
- },
|
|
|
- created() {
|
|
|
},
|
|
|
+ created() {},
|
|
|
mounted() {},
|
|
|
destroyed() {},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <el-drawer
|
|
|
- v-bind="$attrs"
|
|
|
- v-on="$listeners"
|
|
|
- :size="width"
|
|
|
- :visible.sync="visible"
|
|
|
- destroy-on-close
|
|
|
- :show-close="false"
|
|
|
- @close="hide"
|
|
|
- @open="beforeOpen"
|
|
|
- v-loading="loading"
|
|
|
+ <el-drawer
|
|
|
+ v-bind="$attrs"
|
|
|
+ v-on="$listeners"
|
|
|
+ :size="width"
|
|
|
+ :visible.sync="visible"
|
|
|
+ destroy-on-close
|
|
|
+ :show-close="false"
|
|
|
+ @close="hide"
|
|
|
+ @open="beforeOpen"
|
|
|
+ v-loading="loading"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ slot="title"
|
|
|
+ style="display: flex; justify-content: space-between; align-items: center"
|
|
|
>
|
|
|
- <div
|
|
|
- slot="title"
|
|
|
- style="display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;"
|
|
|
- >
|
|
|
- <h3>{{title}}</h3>
|
|
|
- <div>
|
|
|
- <el-button
|
|
|
+ <h3>{{ title }}</h3>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
:size="$attrs.size"
|
|
|
:loading="loading"
|
|
@@ -342,134 +329,122 @@ export default {
|
|
|
<el-button :size="$attrs.size" :loading="loading" @click="hide"
|
|
|
>取 消</el-button
|
|
|
>
|
|
|
- </div>
|
|
|
</div>
|
|
|
- <el-super-form
|
|
|
- v-model="params"
|
|
|
- :dict="dict"
|
|
|
- :rules="rules"
|
|
|
- :size="$attrs.size"
|
|
|
- :columns="TableColumns"
|
|
|
- ref="superForm"
|
|
|
- label-width="auto"
|
|
|
- label-position="right"
|
|
|
- style="padding: 20px"
|
|
|
- >
|
|
|
- <template slot="puOrgName" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
+ </div>
|
|
|
+ <el-super-form
|
|
|
+ v-model="params"
|
|
|
+ :dict="dict"
|
|
|
+ :rules="rules"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :columns="TableColumns"
|
|
|
+ ref="superForm"
|
|
|
+ label-width="auto"
|
|
|
+ label-position="right"
|
|
|
+ style="padding: 20px"
|
|
|
+ >
|
|
|
+ <template slot="puOrgName" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ >
|
|
|
+ </component
|
|
|
+ ></template>
|
|
|
+ </el-super-form>
|
|
|
+
|
|
|
+ <div style="position: relative">
|
|
|
+ <el-tabs v-model="tabName" style="padding: 0 20px 20px">
|
|
|
+ <el-tab-pane
|
|
|
+ v-for="({ item, TableColumns: columns }, index) in TabColumns"
|
|
|
+ :key="index"
|
|
|
+ :label="item.title"
|
|
|
+ :name="item.key"
|
|
|
+ lazy
|
|
|
+ >
|
|
|
+ <el-super-ux-table
|
|
|
+ index
|
|
|
+ v-model="materialInfo[item.key]"
|
|
|
+ :dict="dict"
|
|
|
+ :ref="tabName"
|
|
|
+ :columns="columns"
|
|
|
:size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- >
|
|
|
- </component
|
|
|
- ></template>
|
|
|
- </el-super-form>
|
|
|
-
|
|
|
-
|
|
|
- <div style="position: relative;">
|
|
|
- <el-tabs v-model="tabName" style="padding: 0 20px 20px">
|
|
|
- <el-tab-pane
|
|
|
- v-for="({ item, TableColumns: columns }, index) in TabColumns"
|
|
|
- :key="index"
|
|
|
- :label="item.title"
|
|
|
- :name="item.key"
|
|
|
- lazy
|
|
|
+ :height="420"
|
|
|
>
|
|
|
- <div style="height: 420px;display:flex">
|
|
|
- <el-super-table
|
|
|
- index
|
|
|
- v-model="materialInfo[item.key]"
|
|
|
- :dict="dict"
|
|
|
- :ref="tabName"
|
|
|
- :columns="columns"
|
|
|
+ <template slot="materialName" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
:size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
>
|
|
|
- <!-- <template slot="materialCode" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- copy
|
|
|
- @change="materialCodeChange"
|
|
|
- >
|
|
|
- </component>
|
|
|
- </template> -->
|
|
|
- <template slot="materialName" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- >
|
|
|
- </component>
|
|
|
- </template>
|
|
|
- <!-- 判断是否禁用 -->
|
|
|
- <template slot="drug" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="!(scope.row.medicineMaterial ==='0') "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type[scope.attr.dictName]"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </component>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template slot="registrationNo" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="!(scope.row.medicineMaterial ==='0') "
|
|
|
- >
|
|
|
- </component>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template slot="medicalDevices" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="!(scope.row.medicineMaterial ==='0') "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type[scope.attr.dictName]"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </component>
|
|
|
- </template>
|
|
|
- <template slot="maintenanceType" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="!(scope.row.medicineMaterial ==='0') "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type[scope.attr.dictName]"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </component>
|
|
|
- </template>
|
|
|
- <!-- <template slot="dosageFromName" slot-scope="scope">
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+ <!-- 判断是否禁用 -->
|
|
|
+ <template slot="drug" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="!(scope.row.medicineMaterial === '0')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type[scope.attr.dictName]"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="registrationNo" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="!(scope.row.medicineMaterial === '0')"
|
|
|
+ >
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="medicalDevices" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="!(scope.row.medicineMaterial === '0')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type[scope.attr.dictName]"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+ <template slot="maintenanceType" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="!(scope.row.medicineMaterial === '0')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type[scope.attr.dictName]"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+ <!-- <template slot="dosageFromName" slot-scope="scope">
|
|
|
<component
|
|
|
v-bind="scope.attr"
|
|
|
v-model="scope.row[scope.item.key]"
|
|
@@ -479,114 +454,118 @@ export default {
|
|
|
>
|
|
|
</component>
|
|
|
</template> -->
|
|
|
- <!-- 批号及库存状态管理 -->
|
|
|
- <template slot="isInventoryStatus" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- @change="changeIsInventoryStatus(scope.row)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type[scope.attr.dictName]"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </component>
|
|
|
- </template>
|
|
|
- <!-- 效期管理 -->
|
|
|
- <template slot="expiryDateManagerment" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="scope.row.isInventoryStatus !=='0' "
|
|
|
- @change="changeExpiryDateManagerment(scope.row)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type[scope.attr.dictName]"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </component>
|
|
|
- </template>
|
|
|
- <!-- 是否序列号管理 -->
|
|
|
- <template slot="serialNoManager" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="scope.row.isInventoryStatus !=='0' "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in dict.type[scope.attr.dictName]"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </component>
|
|
|
- </template>
|
|
|
- <!-- 有效期 -->
|
|
|
- <template slot="usefulLife" slot-scope="scope">
|
|
|
- <component
|
|
|
- v-bind="scope.attr"
|
|
|
- v-model="scope.row[scope.item.key]"
|
|
|
- :size="$attrs.size"
|
|
|
- :source.sync="scope.row"
|
|
|
- :disabled="scope.row.expiryDateManagerment !=='0'"
|
|
|
- >
|
|
|
- </component>
|
|
|
- </template>
|
|
|
-
|
|
|
- <el-table-column fixed="right" label="操作" width="120" align="center">
|
|
|
- <template slot="header" slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- :size="$attrs.size"
|
|
|
- @click="useRowAdd(tabName)"
|
|
|
- >
|
|
|
- 增行
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- :size="$attrs.size"
|
|
|
- @click.native.prevent="useRowRemove(tabName, scope)"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
- <AmendantRecord
|
|
|
- v-if=" tabName ==='materialBasic' && addType === 'edit' && scope.row.id"
|
|
|
- v-model="scope.row"
|
|
|
- ></AmendantRecord>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-super-table>
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- <el-row style="position: absolute; top: 0px; right: 20px">
|
|
|
-
|
|
|
- <BatchImport
|
|
|
- ref="batchImport"
|
|
|
- @import="handelImport"
|
|
|
- @temDownload="handleTemDownload"
|
|
|
- ></BatchImport>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </el-drawer>
|
|
|
+ <!-- 批号及库存状态管理 -->
|
|
|
+ <template slot="isInventoryStatus" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ @change="changeIsInventoryStatus(scope.row)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type[scope.attr.dictName]"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+ <!-- 效期管理 -->
|
|
|
+ <template slot="expiryDateManagerment" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="scope.row.isInventoryStatus !== '0'"
|
|
|
+ @change="changeExpiryDateManagerment(scope.row)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type[scope.attr.dictName]"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+ <!-- 是否序列号管理 -->
|
|
|
+ <template slot="serialNoManager" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="scope.row.isInventoryStatus !== '0'"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type[scope.attr.dictName]"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+ <!-- 有效期 -->
|
|
|
+ <template slot="usefulLife" slot-scope="scope">
|
|
|
+ <component
|
|
|
+ v-bind="scope.attr"
|
|
|
+ v-model="scope.row[scope.item.key]"
|
|
|
+ :size="$attrs.size"
|
|
|
+ :source.sync="scope.row"
|
|
|
+ :disabled="scope.row.expiryDateManagerment !== '0'"
|
|
|
+ >
|
|
|
+ </component>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <ux-table-column
|
|
|
+ fixed="right"
|
|
|
+ title="操作"
|
|
|
+ width="120"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot="header" slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ :size="$attrs.size"
|
|
|
+ @click="useRowAdd(tabName)"
|
|
|
+ >
|
|
|
+ 增行
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ :size="$attrs.size"
|
|
|
+ @click.native.prevent="useRowRemove(tabName, scope)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ <AmendantRecord
|
|
|
+ v-if="
|
|
|
+ tabName === 'materialBasic' &&
|
|
|
+ addType === 'edit' &&
|
|
|
+ scope.row.id
|
|
|
+ "
|
|
|
+ v-model="scope.row"
|
|
|
+ ></AmendantRecord>
|
|
|
+ </template>
|
|
|
+ </ux-table-column>
|
|
|
+ </el-super-ux-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-row style="position: absolute; top: 0px; right: 20px">
|
|
|
+ <BatchImport
|
|
|
+ ref="batchImport"
|
|
|
+ @import="handelImport"
|
|
|
+ @temDownload="handleTemDownload"
|
|
|
+ ></BatchImport>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
</template>
|
|
|
|
|
|
<style scoped>
|
|
@@ -594,5 +573,3 @@ export default {
|
|
|
display: none;
|
|
|
}
|
|
|
</style>
|
|
|
-
|
|
|
-
|