|
|
@@ -137,7 +137,11 @@
|
|
|
>
|
|
|
</template>
|
|
|
<el-input
|
|
|
- v-if="!readonly"
|
|
|
+ v-if="
|
|
|
+ !readonly &&
|
|
|
+ (!originalEditReadOnly ||
|
|
|
+ actionDialog === 'customAdd')
|
|
|
+ "
|
|
|
v-model="form.yuanSheBeiBian"
|
|
|
size="mini"
|
|
|
/>
|
|
|
@@ -1162,6 +1166,10 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ actionDialog: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
params: {
|
|
|
type: Object,
|
|
|
default: function () {
|
|
|
@@ -1308,6 +1316,7 @@ export default {
|
|
|
Ids: [],
|
|
|
showzhuCeYouXiaoQi: false,
|
|
|
dynamicRequiredFields: false,
|
|
|
+ originalEditReadOnly: false,
|
|
|
form: {
|
|
|
gouJinRiQi: '', // 购进日期
|
|
|
changShang: '', // 厂家/品牌
|
|
|
@@ -1677,32 +1686,32 @@ export default {
|
|
|
goSave(flag) {
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
|
this.$refs.formBase.validate(async (validBase) => {
|
|
|
- if (valid&&validBase) {
|
|
|
- try {
|
|
|
- // 维护项目
|
|
|
- this.form.maintenanceItemPoList =
|
|
|
- this.$refs.MaintenanceRef?.[0]?.listDataCopy ||
|
|
|
- this.form.maintenanceItemPoList ||
|
|
|
- []
|
|
|
- // 附属设备及配件
|
|
|
- this.form.accessoriesDevicePoList =
|
|
|
- this.$refs.MoreDevicesRef?.[0]?.listDataCopy ||
|
|
|
- this.form.accessoriesDevicePoList ||
|
|
|
- []
|
|
|
- await this.checkRequired()
|
|
|
- if (this.isEdit) {
|
|
|
- this.goEdit(flag)
|
|
|
- } else {
|
|
|
- this.goAdd()
|
|
|
+ if (valid && validBase) {
|
|
|
+ try {
|
|
|
+ // 维护项目
|
|
|
+ this.form.maintenanceItemPoList =
|
|
|
+ this.$refs.MaintenanceRef?.[0]?.listDataCopy ||
|
|
|
+ this.form.maintenanceItemPoList ||
|
|
|
+ []
|
|
|
+ // 附属设备及配件
|
|
|
+ this.form.accessoriesDevicePoList =
|
|
|
+ this.$refs.MoreDevicesRef?.[0]?.listDataCopy ||
|
|
|
+ this.form.accessoriesDevicePoList ||
|
|
|
+ []
|
|
|
+ await this.checkRequired()
|
|
|
+ if (this.isEdit) {
|
|
|
+ this.goEdit(flag)
|
|
|
+ } else {
|
|
|
+ this.goAdd()
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.warning(error.message)
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- this.$message.warning(error.message)
|
|
|
+ } else {
|
|
|
+ return this.$message.warning('请填写必填项!')
|
|
|
}
|
|
|
- } else {
|
|
|
- return this.$message.warning('请填写必填项!')
|
|
|
- }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
},
|
|
|
// 刷新
|
|
|
async goRefresh() {},
|
|
|
@@ -1735,6 +1744,7 @@ export default {
|
|
|
const deviceres = await getSetting('device')
|
|
|
this.showzhuCeYouXiaoQi = deviceres?.showzhuCeYouXiaoQi || false
|
|
|
this.dynamicRequiredFields = deviceres?.requiredField || false
|
|
|
+ this.originalEditReadOnly = deviceres?.originalEditReadOnly || false
|
|
|
if (this.hideSysDeviceNo) {
|
|
|
this.rules.yuanSheBeiBian[0].message = '设备编号不能为空'
|
|
|
}
|