|
@@ -29,7 +29,7 @@
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
|
|
|
- <el-button size="small" @click="handleQuery">查询</el-button> -->
|
|
|
|
|
|
+ <el-button size="small" @click="handleQuery">查询</el-button> -->
|
|
<el-button size="small" @click="handleRefresh">刷新</el-button>
|
|
<el-button size="small" @click="handleRefresh">刷新</el-button>
|
|
|
|
|
|
</el-button-group>
|
|
</el-button-group>
|
|
@@ -49,7 +49,7 @@
|
|
<el-dropdown-item :command="isInvoke(true)">启用</el-dropdown-item>
|
|
<el-dropdown-item :command="isInvoke(true)">启用</el-dropdown-item>
|
|
<el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item>
|
|
<el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
- </el-dropdown> -->
|
|
|
|
|
|
+ </el-dropdown> -->
|
|
</el-button-group>
|
|
</el-button-group>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
@@ -58,7 +58,7 @@
|
|
<el-button-group>
|
|
<el-button-group>
|
|
<el-button size="small" @click="handleQueryForm">申请单查询</el-button>
|
|
<el-button size="small" @click="handleQueryForm">申请单查询</el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
- </el-col> -->
|
|
|
|
|
|
+ </el-col> -->
|
|
|
|
|
|
<!-- 导入导出 -->
|
|
<!-- 导入导出 -->
|
|
<!-- <el-col :span="1.5">
|
|
<!-- <el-col :span="1.5">
|
|
@@ -66,7 +66,7 @@
|
|
<el-button size="small" @click="handleImport">批量导入</el-button>
|
|
<el-button size="small" @click="handleImport">批量导入</el-button>
|
|
<el-button size="small" @click="handleExport">批量导出</el-button>
|
|
<el-button size="small" @click="handleExport">批量导出</el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
- </el-col> -->
|
|
|
|
|
|
+ </el-col> -->
|
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
@@ -112,7 +112,7 @@
|
|
<!-- 附件管理 -->
|
|
<!-- 附件管理 -->
|
|
<!-- <el-button-group>
|
|
<!-- <el-button-group>
|
|
<el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button>
|
|
<el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button>
|
|
- </el-button-group> -->
|
|
|
|
|
|
+ </el-button-group> -->
|
|
|
|
|
|
<!-- 切换 -->
|
|
<!-- 切换 -->
|
|
<!-- <el-button-group>
|
|
<!-- <el-button-group>
|
|
@@ -124,7 +124,7 @@
|
|
@click="handleChangePage('next')" />
|
|
@click="handleChangePage('next')" />
|
|
<el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
|
|
<el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
|
|
@click="handleChangePage('end')" />
|
|
@click="handleChangePage('end')" />
|
|
- </el-button-group> -->
|
|
|
|
|
|
+ </el-button-group> -->
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
@@ -132,13 +132,13 @@
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
<!-- <el-form-item label="所属组织"></el-form-item> -->
|
|
<!-- <el-form-item label="所属组织"></el-form-item> -->
|
|
<el-form-item label="物料编码">
|
|
<el-form-item label="物料编码">
|
|
- <el-input v-model="basicData.value.code" size="small" placeholder="物料编码"></el-input>
|
|
|
|
|
|
+ <el-input v-model="basicData.value.code" readonly size="small" placeholder="物料编码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="物料名称">
|
|
<el-form-item label="物料名称">
|
|
- <el-input v-model="basicData.value.name" size="small" placeholder="物料名称"></el-input>
|
|
|
|
|
|
+ <el-input v-model="basicData.value.name" readonly size="small" placeholder="物料名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="英文名称">
|
|
<el-form-item label="英文名称">
|
|
- <el-input v-model="basicData.value.enName" size="small" placeholder="英文名称"></el-input>
|
|
|
|
|
|
+ <el-input v-model="basicData.value.enName" readonly size="small" placeholder="英文名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="版本号"></el-form-item> -->
|
|
<!-- <el-form-item label="版本号"></el-form-item> -->
|
|
</el-form>
|
|
</el-form>
|
|
@@ -161,8 +161,8 @@
|
|
<!-- :disabled="!(headerParam.isEdit && f.edit)" -->
|
|
<!-- :disabled="!(headerParam.isEdit && f.edit)" -->
|
|
<!-- 多选框 -->
|
|
<!-- 多选框 -->
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;">
|
|
<el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;">
|
|
- <el-checkbox :label="f.name" name="type" v-model="basicData.value[f.prop]"
|
|
|
|
- :disabled="!(updateButtonGroup && f.edit)">
|
|
|
|
|
|
+ <el-checkbox :label="f.name" name="type" v-model="basicData.value[f.prop]" true-label="0"
|
|
|
|
+ false-label="2" :disabled="!(updateButtonGroup && f.edit)">
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -175,7 +175,7 @@
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
|
|
<!-- <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictCode" :label="d.dictLabel"
|
|
<!-- <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictCode" :label="d.dictLabel"
|
|
:value="d.dictCode">
|
|
:value="d.dictCode">
|
|
- </el-option> -->
|
|
|
|
|
|
+ </el-option> -->
|
|
|
|
|
|
<div slot="empty"></div>
|
|
<div slot="empty"></div>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -237,7 +237,7 @@
|
|
<!-- 多选框 -->
|
|
<!-- 多选框 -->
|
|
<el-form-item v-if="m.attribute == 'checkbox'">
|
|
<el-form-item v-if="m.attribute == 'checkbox'">
|
|
<el-checkbox :label="m.name" name="type" v-model="medcineData.value[m.prop]"
|
|
<el-checkbox :label="m.name" name="type" v-model="medcineData.value[m.prop]"
|
|
- :disabled="!updateButtonGroup">
|
|
|
|
|
|
+ :disabled="!updateButtonGroup" true-label="0" false-label="2">
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -251,7 +251,7 @@
|
|
|
|
|
|
<!-- <el-option v-if="m.dictId" v-for="d in m.dictValue" :key="d.dictValue"
|
|
<!-- <el-option v-if="m.dictId" v-for="d in m.dictValue" :key="d.dictValue"
|
|
:label="d.dictLabel" :value="d.dictValue">
|
|
:label="d.dictLabel" :value="d.dictValue">
|
|
- </el-option> -->
|
|
|
|
|
|
+ </el-option> -->
|
|
|
|
|
|
<div slot="empty"></div>
|
|
<div slot="empty"></div>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -360,7 +360,7 @@
|
|
</el-row>
|
|
</el-row>
|
|
<!-- 表格数据 -->
|
|
<!-- 表格数据 -->
|
|
<el-table :data="materialType.value" stripe style="width: 100%" max-height="350" v-loading="materialType.loading"
|
|
<el-table :data="materialType.value" stripe style="width: 100%" max-height="350" v-loading="materialType.loading"
|
|
- @selection-change="handleSelectionType">
|
|
|
|
|
|
+ :key="count" @selection-change="handleSelectionType">
|
|
<el-table-column type="selection" width="30" />
|
|
<el-table-column type="selection" width="30" />
|
|
<el-table-column type="index" width="50" label="序号" />
|
|
<el-table-column type="index" width="50" label="序号" />
|
|
<el-table-column v-for="mt in materialType.form" v-if="mt.show" :label="mt.name" width="180">
|
|
<el-table-column v-for="mt in materialType.form" v-if="mt.show" :label="mt.name" width="180">
|
|
@@ -369,28 +369,23 @@
|
|
<!-- :prop="mt.prop" -->
|
|
<!-- :prop="mt.prop" -->
|
|
<!-- 多选框 -->
|
|
<!-- 多选框 -->
|
|
<el-checkbox size="small" v-if="mt.attribute == 'checkbox'" :disabled="!(materialType.isEdit && mt.edit)"
|
|
<el-checkbox size="small" v-if="mt.attribute == 'checkbox'" :disabled="!(materialType.isEdit && mt.edit)"
|
|
- v-model="scope.row[mt.prop]" />
|
|
|
|
|
|
+ true-label="0" false-label="2" v-model="scope.row[mt.prop]" />
|
|
|
|
|
|
- <!-- 下拉框 / 参照弹窗 -->
|
|
|
|
|
|
+ <!-- 下拉框 / 参照弹窗---- 药品类别编码 scope.row[`${mt.prop}Name`] -->
|
|
<el-select size="small" v-else-if="mt.attribute == 'select' && mt.apiUrl"
|
|
<el-select size="small" v-else-if="mt.attribute == 'select' && mt.apiUrl"
|
|
- :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[`${mt.prop}Label`]"
|
|
|
|
- :key="scope.row[mt.prop]" :placeholder="mt.name"
|
|
|
|
- @focus="mt.apiUrl && handleQueryMore(mt, '', { name: 'materialType', prop: mt.prop })">
|
|
|
|
- <!-- <el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
|
|
|
|
- :value="d.dictValue">
|
|
|
|
- </el-option> -->
|
|
|
|
|
|
+ :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]"
|
|
|
|
+ :placeholder="mt.name"
|
|
|
|
+ @focus="mt.apiUrl && handleQueryMore(mt, '', { name: 'materialType', prop: scope.row })">
|
|
<div slot="empty"></div>
|
|
<div slot="empty"></div>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
|
- <el-select size="small" v-else-if="mt.attribute == 'select' && mt.dictId"
|
|
|
|
|
|
+ <!-- <el-select size="small" v-else-if="mt.attribute == 'select' && mt.dictId"
|
|
:disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]"
|
|
:disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]"
|
|
- :placeholder="mt.name"
|
|
|
|
- @focus="mt.apiUrl && handleQueryMore(mt, '', { name: 'materialType', prop: mt.prop })">
|
|
|
|
|
|
+ :placeholder="mt.name">
|
|
<el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
|
|
<el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
|
|
:value="d.dictValue">
|
|
:value="d.dictValue">
|
|
</el-option>
|
|
</el-option>
|
|
- <!-- <div slot="empty"></div> -->
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ </el-select> -->
|
|
|
|
|
|
<!-- 其他类型 -->
|
|
<!-- 其他类型 -->
|
|
|
|
|
|
@@ -442,7 +437,7 @@
|
|
<el-collapse-item title="物料基本信息" name="basic">
|
|
<el-collapse-item title="物料基本信息" name="basic">
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
<el-form :inline="true" label-position="right" :model="basicData.value">
|
|
<!-- <el-form-item label="所属组织">
|
|
<!-- <el-form-item label="所属组织">
|
|
- <el-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input></el-form-item> -->
|
|
|
|
|
|
+ <el-input v-model="basicData.value.orgName" placeholder="所属组织"></el-input></el-form-item> -->
|
|
<el-form-item label="物料编码">
|
|
<el-form-item label="物料编码">
|
|
<el-input v-model="basicData.value.code" size="small" readonly placeholder="物料编码"></el-input>
|
|
<el-input v-model="basicData.value.code" size="small" readonly placeholder="物料编码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -453,7 +448,7 @@
|
|
<el-input v-model="basicData.value.enName" size="small" readonly placeholder="英文名称"></el-input>
|
|
<el-input v-model="basicData.value.enName" size="small" readonly placeholder="英文名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="版本号">
|
|
<!-- <el-form-item label="版本号">
|
|
- <el-input v-model="basicData.value.version" placeholder="版本号"></el-input></el-form-item> -->
|
|
|
|
|
|
+ <el-input v-model="basicData.value.version" placeholder="版本号"></el-input></el-form-item> -->
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
</el-collapse-item>
|
|
</el-collapse-item>
|
|
@@ -474,18 +469,22 @@
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <!-- 下拉框 -->
|
|
|
|
|
|
+ <!-- 下拉框 - 弹窗参照 -->
|
|
<el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
|
|
<el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
|
|
|
|
|
|
- <el-select v-model="otherDeatils.value[`${f.prop}Name`]" :placeholder="f.name"
|
|
|
|
|
|
+ <el-select v-if="f.apiUrl" v-model="otherDeatils.value[`${f.prop}Name`]" :placeholder="f.name"
|
|
:key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)"
|
|
:key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)"
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'otherDeatils', prop: f.prop })">
|
|
@focus="f.apiUrl && handleQueryMore(f, '', { name: 'otherDeatils', prop: f.prop })">
|
|
|
|
|
|
|
|
+ <div slot="empty"></div>
|
|
|
|
+ </el-select>
|
|
|
|
+
|
|
|
|
+ <!-- 字典-下拉 -->
|
|
|
|
+ <el-select v-if="f.disctId" v-model="otherDeatils.value[`${f.prop}Name`]" :placeholder="f.name"
|
|
|
|
+ :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)">
|
|
<el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
<el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
|
|
:value="d.dictValue">
|
|
:value="d.dictValue">
|
|
</el-option>
|
|
</el-option>
|
|
-
|
|
|
|
- <div slot="empty"></div>
|
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -1376,17 +1375,18 @@ export default {
|
|
switch (op) {
|
|
switch (op) {
|
|
// 增行
|
|
// 增行
|
|
case 'add':
|
|
case 'add':
|
|
- let rowObj = _this.materialType.value[0];
|
|
|
|
|
|
+ let rowObj = {};
|
|
|
|
|
|
- for (const key in rowObj) {
|
|
|
|
- if (Object.hasOwnProperty.call(rowObj, key)) {
|
|
|
|
|
|
+ for (const key in _this.materialType.value[0]) {
|
|
|
|
+ if (Object.hasOwnProperty.call(_this.materialType.value[0], key)) {
|
|
|
|
|
|
rowObj[key] = '';
|
|
rowObj[key] = '';
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(rowObj, '物料类别增行rowObj');
|
|
|
|
|
|
+ rowObj['insertId'] = new Date().getTime();
|
|
this.materialType.value.push(rowObj);
|
|
this.materialType.value.push(rowObj);
|
|
|
|
+ console.log(this.materialType.value, '物料类别增行rowObj后');
|
|
|
|
|
|
break;
|
|
break;
|
|
// 删行
|
|
// 删行
|
|
@@ -1394,7 +1394,13 @@ export default {
|
|
console.log('物料类别删行', _this.materialType.checkedList);
|
|
console.log('物料类别删行', _this.materialType.checkedList);
|
|
if (_this.materialType.checkedList.length) {
|
|
if (_this.materialType.checkedList.length) {
|
|
_this.materialType.checkedList.map(c => {
|
|
_this.materialType.checkedList.map(c => {
|
|
- _this.materialType.value = _this.materialType.value.filter(m => m.id != c.id)
|
|
|
|
|
|
+ _this.materialType.value = _this.materialType.value.filter(m => {
|
|
|
|
+ if (m.id && m.id != '' && m.id != c.id) {
|
|
|
|
+ return m;
|
|
|
|
+ } else if (m.insertId && m.insertId != '' && m.insertId != c.insertId) {
|
|
|
|
+ return m
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -1423,7 +1429,7 @@ export default {
|
|
materialApi.medcineitemBatchSave(params).then(res => {
|
|
materialApi.medcineitemBatchSave(params).then(res => {
|
|
console.log(res, '保存物料类型');
|
|
console.log(res, '保存物料类型');
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- _this, materialType.isEdit = false;
|
|
|
|
|
|
+ _this.materialType.isEdit = false;
|
|
_this.handleMaterialTypeRow();
|
|
_this.handleMaterialTypeRow();
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1621,11 +1627,30 @@ export default {
|
|
} else if (this.MoreDataDialog.target.name == 'materialType') {
|
|
} else if (this.MoreDataDialog.target.name == 'materialType') {
|
|
|
|
|
|
// 物料类别
|
|
// 物料类别
|
|
- this.materialType.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
|
|
|
|
|
|
|
|
- this.materialType.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
|
|
|
|
|
|
+ console.log(this.MoreDataDialog.target, 'this.MoreDataDialog.target------------------');
|
|
|
|
+
|
|
|
|
+ console.log('确认时选择的数据', this.MoreDataDialog.value);
|
|
|
|
+
|
|
|
|
+ this.materialType.value = this.materialType.value.map(m => {
|
|
|
|
+ if (m.id == this.MoreDataDialog.target.prop['id'] || m.insertId == this.MoreDataDialog.target.prop['insertId']) {
|
|
|
|
+ m.drugId = this.MoreDataDialog.value['id'];
|
|
|
|
+ m.drugCode = this.MoreDataDialog.value['code'];
|
|
|
|
+ m.drugName = this.MoreDataDialog.value['name'];
|
|
|
|
+ }
|
|
|
|
+ console.log(m, '物料维护列表中每一项的值');
|
|
|
|
+ return m;
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ console.log(this.materialType.value, '修改之后-----this.materialType.value');
|
|
|
|
+
|
|
|
|
+ // this.materialType.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
|
|
|
|
+
|
|
|
|
+ // this.materialType.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
|
|
|
|
+
|
|
|
|
+ // console.log(this.materialType.value, 'this.materialType.value');
|
|
|
|
|
|
- console.log(this.materialType.value[`${this.MoreDataDialog.target.prop}Name`], '/////////物料类别///////');
|
|
|
|
|
|
+ // console.log(this.materialType.value[`${this.MoreDataDialog.target.prop}Name`], '/////////物料类别///////');
|
|
}
|
|
}
|
|
this.count++;
|
|
this.count++;
|
|
this.MoreDataDialog.show = false;
|
|
this.MoreDataDialog.show = false;
|