6.11宁夏下拉框新增输入功能
This commit is contained in:
parent
ee0b911a56
commit
2fea12cec5
|
|
@ -113,19 +113,21 @@
|
||||||
<uni-easyinput type="number" maxlength="11" v-model="exitFormData.phone" placeholder="请输入"></uni-easyinput>
|
<uni-easyinput type="number" maxlength="11" v-model="exitFormData.phone" placeholder="请输入"></uni-easyinput>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="unitId" required label="选择退料单位" label-width="150">
|
<uni-forms-item name="unitId" required label="选择退料单位" label-width="150">
|
||||||
<uni-data-select
|
<zxz-uni-data-select
|
||||||
v-model="exitFormData.unitId"
|
v-model="exitFormData.unitId"
|
||||||
:localdata="deptRange"
|
:localdata="deptRange"
|
||||||
@change="deptChange"
|
@change="deptChange"
|
||||||
:clear="false"
|
:clear="false"
|
||||||
></uni-data-select>
|
filterable
|
||||||
|
></zxz-uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="lotId" required label="选择退料工程" label-width="150">
|
<uni-forms-item name="lotId" required label="选择退料工程" label-width="150">
|
||||||
<uni-data-select
|
<zxz-uni-data-select
|
||||||
v-model="exitFormData.lotId"
|
v-model="exitFormData.lotId"
|
||||||
:localdata="projRange"
|
:localdata="projRange"
|
||||||
:clear="false"
|
:clear="false"
|
||||||
></uni-data-select>
|
filterable
|
||||||
|
></zxz-uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="exitTime" required label="选择预退料时间" label-width="150">
|
<uni-forms-item name="exitTime" required label="选择预退料时间" label-width="150">
|
||||||
<uni-datetime-picker type="date" :clear-icon="false" v-model="exitFormData.exitTime"/>
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="exitFormData.exitTime"/>
|
||||||
|
|
@ -231,25 +233,28 @@ import { basePath } from '../../public'
|
||||||
deptChange (e) {
|
deptChange (e) {
|
||||||
let that = this
|
let that = this
|
||||||
console.log(e, that.fetchedList);
|
console.log(e, that.fetchedList);
|
||||||
for (let i = 0; i < that.fetchedList.length; i++) {
|
that.fetchedList.forEach(list => {
|
||||||
if (e == that.fetchedList[i].id) {
|
if (e.value == list.id) that.newAdd.unitName = list.name
|
||||||
that.newAdd.unitName = that.fetchedList[i].name
|
})
|
||||||
}
|
that.$api.fetchMaterial.getProjList({
|
||||||
}
|
id: e.value
|
||||||
this.$api.fetchMaterial.getProjList({
|
}).then(res => {
|
||||||
id: e
|
|
||||||
}, null).then(res => {
|
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
that.projRange = res.data.data.map((item) => {
|
that.projRange = res.data.data.map(item => {
|
||||||
return {
|
return {
|
||||||
text: item['name'],
|
text: item['name'],
|
||||||
value: item['id']
|
value: item['id']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.data.msg
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
formSubmit () {
|
formSubmit () {
|
||||||
|
|
@ -291,7 +296,10 @@ import { basePath } from '../../public'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单位与工程不匹配!'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -58,17 +58,19 @@
|
||||||
<view class="select-area">
|
<view class="select-area">
|
||||||
<uni-forms ref="deptForm" :modelValue="deptFormData" :rules="rules">
|
<uni-forms ref="deptForm" :modelValue="deptFormData" :rules="rules">
|
||||||
<uni-forms-item name="deptName" required label="选择部门" label-width="100">
|
<uni-forms-item name="deptName" required label="选择部门" label-width="100">
|
||||||
<uni-data-select
|
<zxz-uni-data-select
|
||||||
v-model="deptFormData.deptName"
|
v-model="deptFormData.deptName"
|
||||||
:localdata="deptRange"
|
:localdata="deptRange"
|
||||||
@change="deptChange"
|
@change="deptChange"
|
||||||
></uni-data-select>
|
filterable
|
||||||
|
></zxz-uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item name="projName" required label="选择工程" label-width="100">
|
<uni-forms-item name="projName" required label="选择工程" label-width="100">
|
||||||
<uni-data-select
|
<zxz-uni-data-select
|
||||||
v-model="deptFormData.projName"
|
v-model="deptFormData.projName"
|
||||||
:localdata="projRange"
|
:localdata="projRange"
|
||||||
></uni-data-select>
|
filterable
|
||||||
|
></zxz-uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<button class="submit-btn" @click="formSubmit">保存</button>
|
<button class="submit-btn" @click="formSubmit">保存</button>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
|
|
@ -266,9 +268,6 @@ import { basePath } from '../../public';
|
||||||
let that = this
|
let that = this
|
||||||
let nowRole = uni.getStorageSync('roles')
|
let nowRole = uni.getStorageSync('roles')
|
||||||
let found = false
|
let found = false
|
||||||
/* that.ableUseArr.forEach(item => {
|
|
||||||
if (nowRole.includes(item)) found = true
|
|
||||||
}) */
|
|
||||||
for (let role of nowRole) {
|
for (let role of nowRole) {
|
||||||
console.log(role);
|
console.log(role);
|
||||||
if (that.ableUseArr.includes(role)) {
|
if (that.ableUseArr.includes(role)) {
|
||||||
|
|
@ -278,9 +277,6 @@ import { basePath } from '../../public';
|
||||||
}
|
}
|
||||||
console.log(found);
|
console.log(found);
|
||||||
await this.getgreementId()
|
await this.getgreementId()
|
||||||
/* if(this.deptFormData.deptName = ''){
|
|
||||||
return;
|
|
||||||
} */
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -350,7 +346,7 @@ import { basePath } from '../../public';
|
||||||
console.log(e);
|
console.log(e);
|
||||||
// 切换部门时展示工程
|
// 切换部门时展示工程
|
||||||
this.$api.fetchMaterial.getProjList({
|
this.$api.fetchMaterial.getProjList({
|
||||||
id: e
|
id: e.value
|
||||||
}, null).then(res => {
|
}, null).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue