修复bug,更新优化

This commit is contained in:
weipengfei 2023-09-07 10:56:56 +08:00
parent dbbf9e789e
commit c4c747ecd1
5 changed files with 18 additions and 13 deletions

View File

@ -36,13 +36,13 @@
</u-form-item> </u-form-item>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
<u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom> <u-form-item labelWidth="auto" label="养殖开始时间" required prop="breeding_time" borderBottom>
<u--input :value="formData.breeding_time" placeholder="请选择养殖开始时间" disabled disabledColor="#fff"></u--input> <u--input :value="formData.breeding_time" style="pointer-events: none;" placeholder="请选择养殖开始时间" disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom> <u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled disabledColor="#fff"></u--input> <u--input :value="formData.mature_time" style="pointer-events: none;" placeholder="请选择上市时间" disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>

View File

@ -17,7 +17,7 @@
</u-form-item> </u-form-item>
<picker :range="landPlanList" :disabled="readonly" mode="selector" @change="changeLanPlan"> <picker :range="landPlanList" :disabled="readonly" mode="selector" @change="changeLanPlan">
<u-form-item labelWidth="auto" label="土地规划" required prop="planning" borderBottom> <u-form-item labelWidth="auto" label="土地规划" required prop="planning" borderBottom>
<u--input :value="landPlanList[formData.planning]" placeholder="请选择规划" disabled <u--input :value="landPlanList[formData.planning]" style="pointer-events: none;" placeholder="请选择规划" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
@ -50,14 +50,14 @@
</u-form-item> </u-form-item>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
<u-form-item labelWidth="auto" label="种植开始时间" required prop="breeding_time" borderBottom> <u-form-item labelWidth="auto" label="种植开始时间" required prop="breeding_time" borderBottom>
<u--input :value="formData.breeding_time" placeholder="请选择种植开始时间" disabled <u--input :value="formData.breeding_time" style="pointer-events: none;" placeholder="请选择种植开始时间" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'"> <picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
<u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom> <u-form-item labelWidth="auto" label="上市时间" required prop="mature_time" borderBottom>
<u--input :value="formData.mature_time" placeholder="请选择上市时间" disabled <u--input :value="formData.mature_time" style="pointer-events: none;" placeholder="请选择上市时间" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>

View File

@ -8,15 +8,15 @@
<u-form-item label="姓名" required prop="family.name" borderBottom> <u-form-item label="姓名" required prop="family.name" borderBottom>
<u--input v-model="item.name" :readonly="readonly" placeholder="请输入姓名"></u--input> <u--input v-model="item.name" :readonly="readonly" placeholder="请输入姓名"></u--input>
</u-form-item> </u-form-item>
<picker mode="date" value="1990-01-01" @change="changebirth_time" :disabled="readonly" :data-index="index"> <picker mode="date" value="1990-01-01" @change="changebirth_time" :disabled="readonly" :data-index="family_index">
<u-form-item labelWidth="auto" label="出生日期" required prop="family.birth_time" borderBottom> <u-form-item labelWidth="auto" label="出生日期" required prop="family.birth_time" borderBottom>
<u--input :value="item.birth_time" placeholder="请选择出生日期" readonly></u--input> <u--input :value="item.birth_time" style="pointer-events: none;" placeholder="请选择出生日期" readonly></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
<picker mode="selector" :range="situationList" @change="changesituation" :disabled="readonly" :data-index="index"> <picker mode="selector" :range="situationList" @change="changesituation" :disabled="readonly" :data-index="family_index">
<u-form-item labelWidth="auto" label="就业情况" required prop="family.situation" borderBottom> <u-form-item labelWidth="auto" label="就业情况" required prop="family.situation" borderBottom>
<u--input :value="situationList[item.situation]" placeholder="请选择就业情况" readonly></u--input> <u--input :value="situationList[item.situation]" style="pointer-events: none;" placeholder="请选择就业情况" readonly></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
</picker> </picker>
@ -24,7 +24,7 @@
<u--input v-model="item.skills" :readonly="readonly" placeholder="请输入技能特长"></u--input> <u--input v-model="item.skills" :readonly="readonly" placeholder="请输入技能特长"></u--input>
</u-form-item> </u-form-item>
<button v-if="!readonly" class="delete" <button v-if="!readonly" class="delete"
@click="removeFamily(index)">删除以上信息</button> @click="removeFamily(family_index)">删除以上信息</button>
</block> </block>
<button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button> <button v-if="!readonly" class="plus" @click="pushFamily">添加常住人口</button>
</block> </block>
@ -72,7 +72,7 @@
<u--textarea v-model="item.notes" autoHeight :disabled="readonly"placeholder="请输入备注" border="surround" count></u--textarea> <u--textarea v-model="item.notes" autoHeight :disabled="readonly"placeholder="请输入备注" border="surround" count></u--textarea>
</u-form-item> </u-form-item>
<button v-if="residents.child_arr.length>1&&!readonly" class="delete" <button v-if="residents.child_arr.length>1&&!readonly" class="delete"
@click="removeChildArr(index)">删除以上信息</button> @click="removeChildArr(child_arr_index)">删除以上信息</button>
</block> </block>
<button v-if="residents.child>0&&!readonly" class="plus" @click="pushChildArr">添加学生婴幼儿</button> <button v-if="residents.child>0&&!readonly" class="plus" @click="pushChildArr">添加学生婴幼儿</button>
</block> </block>

View File

@ -29,7 +29,7 @@
</u-form-item> </u-form-item>
<picker :range="storeTypeList" :disabled="readonly" mode="selector" @change="changeType"> <picker :range="storeTypeList" :disabled="readonly" mode="selector" @change="changeType">
<u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom> <u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom>
<u--input :value="storeTypeList[formData.type]" placeholder="请选择经营类型" disabled <u--input :value="storeTypeList[formData.type]" style="pointer-events: none;" placeholder="请选择经营类型" disabled
disabledColor="#fff"></u--input> disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> <u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>

View File

@ -55,9 +55,11 @@
keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker> keyName="name" @change="changeHandler" @cancel="demandShow = false" @confirm="changeDemand"></u-picker>
</u--form> </u--form>
<!-- <button @click="addArchives" class="btn">完成更新</button> --> <!-- <button @click="addArchives" class="btn">完成更新</button> -->
<mybtn text="完成更新" @click="$u.throttle(addArchives, 1500)"></mybtn> <mybtn text="完成更新" @click="updateShow=true"></mybtn>
<u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton <u-modal :show="modelShow" title="警告" content='确定要删除该信息吗' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal> @close="modelShow=false" @cancel="modelShow=false" @confirm="deleteDemand(deleteIndex)"></u-modal>
<u-modal :show="updateShow" title="提示" content='确认信息无误后再更新' closeOnClickOverlay showCancelButton
@close="updateShow=false" @cancel="updateShow=false" @confirm="$u.throttle(addArchives, 1500)"></u-modal>
</view> </view>
</view> </view>
</template> </template>
@ -113,6 +115,7 @@
updateFlag: true, updateFlag: true,
task_id: 0, task_id: 0,
modelShow: false, // modelShow: false, //
updateShow: false, //
deleteIndex: -1, // deleteIndex: -1, //
formData: { formData: {
id_card: '', id_card: '',
@ -143,6 +146,8 @@
}, },
// //
async addArchives() { async addArchives() {
this.updateShow = false;
await this.$nextTick();
if (this.showDemandList.length == 0) return Toast('请先添加需求!'); if (this.showDemandList.length == 0) return Toast('请先添加需求!');
let refsDatas = await this.loadRefsDatas(); let refsDatas = await this.loadRefsDatas();
if (!this.updateFlag) return; if (!this.updateFlag) return;