|
|
@ -5,22 +5,10 @@ |
|
|
|
<u-form-item label="故障描述" prop="describes" required> |
|
|
|
<u-input v-model="form.describes" placeholder="请输入故障描述" /> |
|
|
|
</u-form-item> |
|
|
|
<!-- <u-form-item label="所属厂区" prop="factoryAreaNumber" required> |
|
|
|
<view class="select" |
|
|
|
@click="openSingleColumn('factoryAreaNumber',form.factoryAreaNumber,factoryAreaList)"> |
|
|
|
<view class="input" v-if='form.factoryAreaNumber'> |
|
|
|
{{selectFormat(form.factoryAreaNumber,factoryAreaList)}} |
|
|
|
</view> |
|
|
|
<view class="placeholder" v-else> |
|
|
|
{{`请选择所属厂区`}} |
|
|
|
</view> |
|
|
|
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|
|
|
</view> |
|
|
|
</u-form-item> --> |
|
|
|
<u-form-item label="类型" prop="type" required> |
|
|
|
<view class="select" @click="openSingleColumn('type',form.type,appDeviceMoldType)"> |
|
|
|
<view class="input" v-if='form.type'> |
|
|
|
{{selectFormat(form.type,appDeviceMoldType)}} |
|
|
|
{{form.typeName}} |
|
|
|
</view> |
|
|
|
<view class="placeholder" v-else> |
|
|
|
{{`请选择类型`}} |
|
|
@ -28,17 +16,6 @@ |
|
|
|
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
<!-- <u-form-item :label="`${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}`" prop="deviceNumber" required> |
|
|
|
<view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)"> |
|
|
|
<view class="input" v-if='form.deviceNumber'> |
|
|
|
{{selectFormat(form.deviceNumber,deviceList)}} |
|
|
|
</view> |
|
|
|
<view class="placeholder" v-else> |
|
|
|
{{`请选择${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}`}} |
|
|
|
</view> |
|
|
|
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|
|
|
</view> |
|
|
|
</u-form-item> --> |
|
|
|
<u-form-item :label="`${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}编码`" prop="deviceNumber" required> |
|
|
|
<u-input v-model="form.deviceNumber" :placeholder="`请输入${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}编码`" |
|
|
|
@blur="blur()" /> |
|
|
@ -109,12 +86,14 @@ |
|
|
|
deviceName: '', |
|
|
|
factoryAreaName: '', |
|
|
|
factoryAreaNumber: '', |
|
|
|
type: '' |
|
|
|
type: '', |
|
|
|
typeName:'' |
|
|
|
}) |
|
|
|
const singleColumnShow = ref(false) |
|
|
|
const singleColumnDefaultValue = ref([]) |
|
|
|
const singleColumnList = ref([]) |
|
|
|
const imgList = ref([]) |
|
|
|
const field = ref('') |
|
|
|
function chickRightButton(field) { |
|
|
|
if (!form.value.type) { |
|
|
|
proxy.$modal.showToast('请先选择类型') |
|
|
@ -249,10 +228,6 @@ console.log(res) |
|
|
|
form.value = {} |
|
|
|
imgList.value = [] |
|
|
|
} |
|
|
|
function selectFormat(val, array) { |
|
|
|
let str = array.filter(item => item.value == val)[0].label |
|
|
|
return str |
|
|
|
} |
|
|
|
// 单列模式 |
|
|
|
function openSingleColumn(fieldName, val, list) { |
|
|
|
singleColumnList.value = list |
|
|
@ -274,6 +249,7 @@ console.log(res) |
|
|
|
} |
|
|
|
if (field.value == 'type') { |
|
|
|
type.value = form.value[field.value] |
|
|
|
form.value.typeName = e[0].label |
|
|
|
getDetailsByNumber() |
|
|
|
} |
|
|
|
singleColumnShow.value = false |
|
|
@ -320,6 +296,7 @@ console.log(res) |
|
|
|
appDeviceMoldTyp.value =appDeviceMoldType.value.filter((item => item.value == "MOLD")) |
|
|
|
} |
|
|
|
form.value.type = appDeviceMoldType.value[0].value |
|
|
|
form.value.typeName = appDeviceMoldType.value[0].label |
|
|
|
getFactoryAreaList() |
|
|
|
}) |
|
|
|
</script> |
|
|
|