|
@@ -607,7 +607,7 @@
|
|
|
<div class="btn_group">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" size="small" plain @click="save"
|
|
|
- v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
|
|
|
+ v-if="pageStu == 'add' || pageStu == 'edit' || pageStu ==='copy' ">保存</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5" style="margin: 0 10px;">
|
|
|
<el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
|
|
@@ -898,7 +898,7 @@ export default {
|
|
|
// }
|
|
|
// },
|
|
|
mounted() {
|
|
|
- // console.log('页面状态',this.pageStu)
|
|
|
+ console.log('页面状态',this.pageStu)
|
|
|
if (this.pageStu == 'check') {
|
|
|
// alert('详情页面:')
|
|
|
console.log('页面状态', this.pageStu)
|
|
@@ -943,7 +943,7 @@ export default {
|
|
|
if (this.row.innerPackingUnit) {
|
|
|
this.getInnerPackingUnitDetails(this.row.innerPackingUnit)
|
|
|
}
|
|
|
- } else if (this.pageStu == 'edit') {
|
|
|
+ } else if (this.pageStu == 'edit' ) {
|
|
|
// alert('修改页面')
|
|
|
console.log('页面状态', this.pageStu)
|
|
|
console.log('数据', this.row)
|
|
@@ -1001,6 +1001,58 @@ export default {
|
|
|
} else if (this.pageStu == 'add') {
|
|
|
// alert('新增页面')
|
|
|
console.log('页面状态', this.pageStu)
|
|
|
+ }else if(this.pageStu === 'copy'){
|
|
|
+ this.getDetails(this.row)
|
|
|
+ // 控制效期单位后面的是否可填写
|
|
|
+ if (this.row.expiryDateManagerment == '0') {
|
|
|
+ this.isExp = false
|
|
|
+ } else {
|
|
|
+ this.isExp = true
|
|
|
+ }
|
|
|
+ // 控制业务部门是否能够填写
|
|
|
+ if (this.row.purchasingOrganization) {
|
|
|
+ this.orgControl = false
|
|
|
+ } else {
|
|
|
+ this.orgControl = true
|
|
|
+ }
|
|
|
+ // 控制医药属性是否能够填写
|
|
|
+ if (this.row.isMedicine == '0') {
|
|
|
+ this.isControl = false
|
|
|
+ } else {
|
|
|
+ this.isControl = true
|
|
|
+ }
|
|
|
+ // 生产厂家代理人用于回显
|
|
|
+ if (this.row.manufacturerId) {
|
|
|
+ this.getFactoryDetails(this.row.manufacturerId)
|
|
|
+ }
|
|
|
+ // 计量单位回显
|
|
|
+ if (this.row.unitId) {
|
|
|
+ this.getUnitDetails(this.row.unitId)
|
|
|
+ }
|
|
|
+ // 产地回显
|
|
|
+ if (this.row.originPlace) {
|
|
|
+ this.getPlaceDetails(this.row.originPlace)
|
|
|
+ }
|
|
|
+ // 物料税类回显
|
|
|
+ if (this.row.materialRate) {
|
|
|
+ this.getTaxDetails(this.row.materialRate)
|
|
|
+ }
|
|
|
+ // 物料税类回显
|
|
|
+ if (this.row.puPersonnelId) {
|
|
|
+ this.getStaffDetails(this.row.puPersonnelId)
|
|
|
+ }
|
|
|
+ // 业务线回显
|
|
|
+ if (this.row.businessLine) {
|
|
|
+ this.getLineDetails(this.row.businessLine)
|
|
|
+ }
|
|
|
+ // 中包装单位回显
|
|
|
+ if (this.row.mediumPackageUnitId) {
|
|
|
+ this.getMidPackDetails(this.row.mediumPackageUnitId)
|
|
|
+ }
|
|
|
+ // 内包装单位回显
|
|
|
+ if (this.row.innerPackingUnit) {
|
|
|
+ this.getInnerPackingUnitDetails(this.row.innerPackingUnit)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -1164,7 +1216,36 @@ export default {
|
|
|
getReqDetail(row.id).then(res => {
|
|
|
console.log('res', res)
|
|
|
if (res.code === 200) {
|
|
|
- this.basicForm = res.data
|
|
|
+
|
|
|
+ this.basicForm = res.data;
|
|
|
+
|
|
|
+ if(this.pageStu === 'copy'){
|
|
|
+
|
|
|
+ this.basicForm.id = '';
|
|
|
+
|
|
|
+ this.basicForm.billCode = '';
|
|
|
+
|
|
|
+ this.basicForm.diCode = '';
|
|
|
+
|
|
|
+ this.basicForm.status = '0';
|
|
|
+
|
|
|
+ this.basicForm.sysMaterialMedcineApply.id = '';
|
|
|
+
|
|
|
+ this.basicForm.sysMaterialMedcineItemApply.length &&
|
|
|
+
|
|
|
+ this.basicForm.sysMaterialMedcineItemApply.forEach(item =>(item.id = ''));
|
|
|
+
|
|
|
+ this.basicForm.createName = '';
|
|
|
+
|
|
|
+ this.basicForm.createTime = '';
|
|
|
+
|
|
|
+ this.basicForm.updateName = '';
|
|
|
+
|
|
|
+ this.basicForm.updateTime = '';
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// 获取树形详情
|
|
|
if (res.data.classifyId) {
|
|
|
this.getTreeDetails(res.data.classifyId)
|
|
@@ -1196,8 +1277,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
save() {
|
|
|
- let sparams = { ...this.basicForm, ...{ status: 0 } }
|
|
|
- console.log(sparams, 'sparams');
|
|
|
+ // let sparams = { ...this.basicForm, ...{ status: 0 } }
|
|
|
+ // console.log(sparams, 'sparams');
|
|
|
if (this.pageStu == 'edit') {
|
|
|
if (!this.basicForm.proposerId) {
|
|
|
this.basicForm.proposerId = this.$store.state.user.name
|
|
@@ -1228,13 +1309,17 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
+
|
|
|
// alert('保存传status:0')
|
|
|
if (!this.basicForm.proposerId) {
|
|
|
this.basicForm.proposerId = this.$store.state.user.name
|
|
|
}
|
|
|
- let sparams = { ...this.basicForm, ...{ status: 0 } }
|
|
|
- sparams.sysMaterialMedcineApply = this.basicForm2
|
|
|
- sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply
|
|
|
+ let sparams = { ...this.basicForm, ...{ status: 0 } };
|
|
|
+
|
|
|
+ sparams.sysMaterialMedcineApply = this.basicForm2;
|
|
|
+
|
|
|
+ sparams.sysMaterialMedcineItemApply = this.sysMaterialMedcineItemApply;
|
|
|
+
|
|
|
console.log('保存参数', sparams)
|
|
|
const form1 = new Promise((resolve, reject) => {
|
|
|
this.$refs['basic'].validate(valid => {
|