|
@ -36,17 +36,17 @@ |
|
|
<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 |
|
|
<u-form-item :label="`${form.receiverType=='DEVICE'||form.receiverType == 'TECH'?'设备' : '模具'}编码`" prop="deviceNumber" required |
|
|
v-if="form.status==0"> |
|
|
v-if="form.status==0"> |
|
|
<u-input v-model="form.deviceNumber" :placeholder="`请输入${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}编码`" |
|
|
<u-input v-model="form.deviceNumber" :placeholder="`请输入${form.receiverType=='DEVICE'||form.receiverType == 'TECH'?'设备' : '模具'}编码`" |
|
|
@blur="blur()" /> |
|
|
@blur="blur()" /> |
|
|
<view class="right-button" @click="chickRightButton"> |
|
|
<view class="right-button" @click="chickRightButton"> |
|
|
扫描 |
|
|
扫描 |
|
|
</view> |
|
|
</view> |
|
|
</u-form-item> |
|
|
</u-form-item> |
|
|
<u-form-item :label="`${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}名称`" prop="deviceNumber" required |
|
|
<u-form-item :label="`${form.receiverType=='DEVICE'||form.receiverType == 'TECH'?'设备' : '模具'}名称`" prop="deviceNumber" required |
|
|
class="disabled" v-if="form.status==0"> |
|
|
class="disabled" v-if="form.status==0"> |
|
|
<u-input v-model="form.deviceName" :placeholder="`根据${type=='DEVICE'||type == 'TECH'?'设备' : '模具'}编码获得`" |
|
|
<u-input v-model="form.deviceName" :placeholder="`根据${form.receiverType=='DEVICE'||form.receiverType == 'TECH'?'设备' : '模具'}编码获得`" |
|
|
disabled /> |
|
|
disabled /> |
|
|
</u-form-item> |
|
|
</u-form-item> |
|
|
<u-form-item label="维修人员" prop="describes" required> |
|
|
<u-form-item label="维修人员" prop="describes" required> |
|
@ -150,7 +150,7 @@ |
|
|
} |
|
|
} |
|
|
if (form.value.status == 0) { |
|
|
if (form.value.status == 0) { |
|
|
if (!form.value.deviceNumber) { |
|
|
if (!form.value.deviceNumber) { |
|
|
proxy.$modal.showToast(`请选择${type.value == 'DEVICE' || type.value == 'TECH' ? '设备' : '模具'}编码`) |
|
|
proxy.$modal.showToast(`请选择${form.value.receiverType == 'DEVICE' || form.value.receiverType == 'TECH' ? '设备' : '模具'}编码`) |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -258,16 +258,18 @@ |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
selecUserList.value = [] |
|
|
selecUserList.value = [] |
|
|
|
|
|
form.value.receiverUserId = '' |
|
|
}) |
|
|
}) |
|
|
} else if (form.value.receiverType == 'MOLD') { |
|
|
} else if (form.value.receiverType == 'MOLD') { |
|
|
moldApi.getMoldDetailsByNumber({ |
|
|
moldApi.getMoldDetailsByNumber({ |
|
|
number: form.deviceNumber |
|
|
number: form.value.deviceNumber, |
|
|
}).then(async (res) => { |
|
|
}).then(async (res) => { |
|
|
if (!res.data) { |
|
|
if (!res.data) { |
|
|
form.value.deviceName = '' |
|
|
form.value.deviceName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
selecUserList.value = [] |
|
|
selecUserList.value = [] |
|
|
|
|
|
form.value.receiverUserId = '' |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
form.value.deviceName = res.data.name |
|
|
form.value.deviceName = res.data.name |
|
@ -279,6 +281,7 @@ |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaName = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
form.value.factoryAreaNumber = '' |
|
|
selecUserList.value = [] |
|
|
selecUserList.value = [] |
|
|
|
|
|
form.value.receiverUserId = '' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -298,14 +301,16 @@ |
|
|
function chooseSingleColumn(e) { |
|
|
function chooseSingleColumn(e) { |
|
|
form.value[field.value] = e[0].value |
|
|
form.value[field.value] = e[0].value |
|
|
if (field.value == 'receiverType') { |
|
|
if (field.value == 'receiverType') { |
|
|
type.value = form.value[field.value] |
|
|
|
|
|
form.value.deviceName = '' |
|
|
form.value.deviceName = '' |
|
|
form.value.deviceNumber = '' |
|
|
form.value.deviceNumber = '' |
|
|
form.value.receiverUserId = undefined |
|
|
form.value.receiverUserId = undefined |
|
|
form.value.receiverTypeTxt = e[0].label |
|
|
form.value.receiverTypeTxt = e[0].label |
|
|
|
|
|
selecUserList.value = [] |
|
|
|
|
|
form.value.receiverUserId = '' |
|
|
getDeviceList() |
|
|
getDeviceList() |
|
|
} else if (field.value == 'factoryAreaNumber') { |
|
|
} else if (field.value == 'factoryAreaNumber') { |
|
|
form.value.factoryAreaName = e[0].label |
|
|
form.value.factoryAreaName = e[0].label |
|
|
|
|
|
form.value.receiverUserId = '' |
|
|
|
|
|
|
|
|
getSelecUser() |
|
|
getSelecUser() |
|
|
} else if (field.value == 'status') { |
|
|
} else if (field.value == 'status') { |
|
@ -318,13 +323,15 @@ |
|
|
console.log(deviceMoldType.value) |
|
|
console.log(deviceMoldType.value) |
|
|
form.value.receiverType = deviceMoldType.value[0].value |
|
|
form.value.receiverType = deviceMoldType.value[0].value |
|
|
form.value.receiverTypeTxt = deviceMoldType.value[0].label |
|
|
form.value.receiverTypeTxt = deviceMoldType.value[0].label |
|
|
|
|
|
selecUserList.value = [] |
|
|
|
|
|
form.value.receiverUserId = '' |
|
|
} |
|
|
} |
|
|
singleColumnShow.value = false |
|
|
singleColumnShow.value = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 获取设备/模具列表 |
|
|
// 获取设备/模具列表 |
|
|
async function getDeviceList() { |
|
|
async function getDeviceList() { |
|
|
if (type.value == 'DEVICE' || type.value == 'TECH') { |
|
|
if (form.value.receiverType == 'DEVICE' || form.value.receiverType == 'TECH') { |
|
|
await deviceApi.deviceList().then(res => { |
|
|
await deviceApi.deviceList().then(res => { |
|
|
res.data.map(item => { |
|
|
res.data.map(item => { |
|
|
item.value = item.number |
|
|
item.value = item.number |
|
@ -332,7 +339,7 @@ |
|
|
}) |
|
|
}) |
|
|
deviceList.value = res.data |
|
|
deviceList.value = res.data |
|
|
}) |
|
|
}) |
|
|
} else if (type.value == 'MOLD') { |
|
|
} else if (form.value.receiverType == 'MOLD') { |
|
|
await moldApi.moldList().then(res => { |
|
|
await moldApi.moldList().then(res => { |
|
|
res.data.map(item => { |
|
|
res.data.map(item => { |
|
|
item.value = item.number |
|
|
item.value = item.number |
|
@ -346,7 +353,7 @@ |
|
|
// 获取人员列表 |
|
|
// 获取人员列表 |
|
|
async function getSelecUser() { |
|
|
async function getSelecUser() { |
|
|
let data = { |
|
|
let data = { |
|
|
classType: type.value, |
|
|
classType: form.value.receiverType, |
|
|
factoryAreaNumber: form.value.factoryAreaNumber, |
|
|
factoryAreaNumber: form.value.factoryAreaNumber, |
|
|
} |
|
|
} |
|
|
let arr = [] |
|
|
let arr = [] |
|
|