|
@ -134,6 +134,7 @@ |
|
|
<view class="sure" @click="chooseUser">确认</view> |
|
|
<view class="sure" @click="chooseUser">确认</view> |
|
|
</view> |
|
|
</view> |
|
|
</u-popup> |
|
|
</u-popup> |
|
|
|
|
|
<SelectItemList :isShowSelectItem=isShowSelectItem :singleColumnList=singleColumnList @searchItem='searchItem' @chooseItem1='chooseItem1'/> |
|
|
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' |
|
|
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' |
|
|
:list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select> |
|
|
:list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select> |
|
|
<u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime' @cancle='datetimeShow = false'></u-picker> |
|
|
<u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime' @cancle='datetimeShow = false'></u-picker> |
|
@ -152,13 +153,14 @@ |
|
|
import * as sparePartsApi from "@/api/spareParts.js" |
|
|
import * as sparePartsApi from "@/api/spareParts.js" |
|
|
import * as deptApi from "@/api/dept.js" |
|
|
import * as deptApi from "@/api/dept.js" |
|
|
import * as dictApi from "@/api/dict.js" |
|
|
import * as dictApi from "@/api/dict.js" |
|
|
|
|
|
import SelectItemList from "../../components/item/slectItemList.vue" |
|
|
const { proxy} = getCurrentInstance() |
|
|
const { proxy} = getCurrentInstance() |
|
|
const loading = ref(false) |
|
|
const loading = ref(false) |
|
|
const type = ref('') |
|
|
const type = ref('') |
|
|
// 备件弹窗 |
|
|
// 备件弹窗 |
|
|
const isPopupShow = ref(false) |
|
|
const isPopupShow = ref(false) |
|
|
const sparePartsList = ref([]) |
|
|
const sparePartsList = ref([]) |
|
|
|
|
|
const isShowSelectItem = ref(false) |
|
|
const singleColumnShow = ref(false) |
|
|
const singleColumnShow = ref(false) |
|
|
const singleColumnDefaultValue = ref([]) |
|
|
const singleColumnDefaultValue = ref([]) |
|
|
const singleColumnList = ref([]) |
|
|
const singleColumnList = ref([]) |
|
@ -167,6 +169,7 @@ |
|
|
const isShowSelecUser = ref(false) |
|
|
const isShowSelecUser = ref(false) |
|
|
const jxDetailsStatus = ref([])//完成情况 |
|
|
const jxDetailsStatus = ref([])//完成情况 |
|
|
const formatDate = ref('')//日期展示 |
|
|
const formatDate = ref('')//日期展示 |
|
|
|
|
|
const deviceNumber = ref(null); |
|
|
const form = ref({ |
|
|
const form = ref({ |
|
|
number: '', |
|
|
number: '', |
|
|
name:'', |
|
|
name:'', |
|
@ -368,7 +371,8 @@ const form = ref({ |
|
|
} else { |
|
|
} else { |
|
|
singleColumnDefaultValue.value = [] |
|
|
singleColumnDefaultValue.value = [] |
|
|
} |
|
|
} |
|
|
singleColumnShow.value = true |
|
|
//singleColumnShow.value = true |
|
|
|
|
|
isShowSelectItem.value = true; |
|
|
} |
|
|
} |
|
|
// 单列模式点击确定之后 |
|
|
// 单列模式点击确定之后 |
|
|
function chooseSingleColumn(e) { |
|
|
function chooseSingleColumn(e) { |
|
@ -388,7 +392,7 @@ const form = ref({ |
|
|
singleColumnShow.value = false |
|
|
singleColumnShow.value = false |
|
|
} |
|
|
} |
|
|
// 获取备件列表 |
|
|
// 获取备件列表 |
|
|
async function getSparePartsList() { |
|
|
async function getSparePartsList(number,name) { |
|
|
number =deviceNumber.value |
|
|
number =deviceNumber.value |
|
|
let param = { |
|
|
let param = { |
|
|
number:number, |
|
|
number:number, |
|
@ -400,6 +404,7 @@ const form = ref({ |
|
|
item.label = item.name |
|
|
item.label = item.name |
|
|
}) |
|
|
}) |
|
|
sparePartsList.value = res.data |
|
|
sparePartsList.value = res.data |
|
|
|
|
|
singleColumnList.value = sparePartsList.value |
|
|
}).catch(() => { }) |
|
|
}).catch(() => { }) |
|
|
} |
|
|
} |
|
|
// 打开弹窗 |
|
|
// 打开弹窗 |
|
@ -444,6 +449,22 @@ const form = ref({ |
|
|
datetimeDefaultValue.value = val ? val : proxy.$time.formatDate() |
|
|
datetimeDefaultValue.value = val ? val : proxy.$time.formatDate() |
|
|
datetimeShow.value = true |
|
|
datetimeShow.value = true |
|
|
} |
|
|
} |
|
|
|
|
|
async function searchItem(name){ |
|
|
|
|
|
await getSparePartsList(null,name); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function chooseItem1(type,forms){ |
|
|
|
|
|
if(!forms.value.number&&type==1){ |
|
|
|
|
|
proxy.$modal.showToast('请选择备件') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if(type==1){ |
|
|
|
|
|
form1.value.number = forms.value.temporarilyNumber |
|
|
|
|
|
form1.value.name =forms.value.temporarilyName |
|
|
|
|
|
} |
|
|
|
|
|
await getSparePartsList(null,null); |
|
|
|
|
|
isShowSelectItem.value = false; |
|
|
|
|
|
} |
|
|
// 日期模式点击确定之后 |
|
|
// 日期模式点击确定之后 |
|
|
function chooseDatetime(e) { |
|
|
function chooseDatetime(e) { |
|
|
let array1 = [] |
|
|
let array1 = [] |
|
@ -474,6 +495,7 @@ const form = ref({ |
|
|
if (option.type) type.value = option.type; |
|
|
if (option.type) type.value = option.type; |
|
|
if (option.factoryAreaNumber) factoryAreaNumber.value = option.factoryAreaNumber; |
|
|
if (option.factoryAreaNumber) factoryAreaNumber.value = option.factoryAreaNumber; |
|
|
if (option.number) form.value.number = option.number; |
|
|
if (option.number) form.value.number = option.number; |
|
|
|
|
|
if (option.deviceNumber) deviceNumber.value = option.deviceNumber; |
|
|
if (option.data && JSON.parse(decodeURIComponent(option.data)) && JSON.parse(decodeURIComponent(option |
|
|
if (option.data && JSON.parse(decodeURIComponent(option.data)) && JSON.parse(decodeURIComponent(option |
|
|
.data)).id) { |
|
|
.data)).id) { |
|
|
form.value = JSON.parse(decodeURIComponent(option.data)) |
|
|
form.value = JSON.parse(decodeURIComponent(option.data)) |
|
|