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