From 1bda72a44cccfb9f79673b95c33cce91057214d2 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期五, 01 九月 2023 09:11:42 +0800
Subject: [PATCH] 小程序
---
minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue | 98 ++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 89 insertions(+), 9 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue b/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
index 4e5b4ab..3b9b607 100644
--- a/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
+++ b/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
@@ -29,14 +29,14 @@
</view>
<van-swipe-cell v-for="(item, index) in list" :key="index">
<view class="rework_qd_list">
- <view class="rework_qd_item">
+ <view class="rework_qd_item" @click="locationShow = true">
<text><b>*</b>鍏ュ簱璐т綅</text>
<view class="rework_qd_item_right">
<text :class="item.locationName ? 'black' : ''">{{item.locationName ? item.locationName : '璇烽�夋嫨'}}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
- <view class="rework_qd_item">
+ <view class="rework_qd_item" @click="materialsShow = true">
<text><b>*</b>鍏ュ簱鐗╂枡</text>
<view class="rework_qd_item_right">
<text :class="item.materialName ? 'black' : ''">{{item.materialName ? item.materialName : '璇烽�夋嫨'}}</text>
@@ -44,7 +44,7 @@
</view>
</view>
<template v-if="form.type !== 25">
- <view class="rework_qd_item">
+ <view class="rework_qd_item" @click="productionShow = true">
<text>鐢熶骇宸ュ簭</text>
<view class="rework_qd_item_right">
<text :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '璇烽�夋嫨'}}</text>
@@ -52,7 +52,7 @@
</view>
</view>
</template>
- <view class="rework_qd_item">
+ <view class="rework_qd_item" @click="qualityShow = true">
<text><b>*</b>璐ㄩ噺灞炴��</text>
<view class="rework_qd_item_right">
<text :class="item.qualityTypeName ? 'black' : ''">{{item.qualityTypeName ? item.qualityTypeName : '璇烽�夋嫨'}}</text>
@@ -62,13 +62,13 @@
<view class="rework_qd_item">
<text>鎵规鍙�</text>
<view class="rework_qd_item_right">
- <u--input placeholder="璇疯緭鍏�" style="width: 230rpx;" border="surround" v-model="item.batch"></u--input>
+ <u--input placeholder="璇疯緭鍏�" inputAlign="right" :customStyle="{width: '230rpx'}" border="surround" v-model="item.batch"></u--input>
</view>
</view>
<view class="rework_qd_item">
<text><b>*</b>鍏ュ簱鏁伴噺<template v-if="item.unitName">({{ item.unitName }})</template></text>
<view class="rework_qd_item_right">
- <u--input placeholder="0" border="surround" v-model="item.num"></u--input>
+ <u--input placeholder="0" inputAlign="right" :customStyle="{width: '230rpx'}" border="surround" v-model="item.num"></u--input>
</view>
</view>
</view>
@@ -78,32 +78,51 @@
</van-swipe-cell>
</view>
<view class="rework_zw"></view>
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<view class="rework_footer">
<button class="rework_footer_submit">鎻愪氦</button>
</view>
<u-toast ref="uToast"></u-toast>
<!-- 浠撳簱 -->
<Warehouse :show="warehouseShow" @close="close" @value="getValue" />
+ <!-- 鐗╂枡 -->
+ <Material :show="materialsShow" @close="close1" @value="getValue1" />
<!-- 璐т綅 -->
- <location :show="locationShow" @close="close1" @value="getValue1" />
+ <location :show="locationShow" :list="locationList" @close="close3" @value="getValue3" />
+ <!-- 宸ュ簭 -->
+ <ProductionProcess :show="productionShow" :list="productionList" @close="close4" @value="getValue4" />
<!-- 鍗曟嵁绫诲瀷 -->
<u-picker :show="typeShow" keyName="name" :columns="typeList" @confirm="confirm" @cancel="typeClose"></u-picker>
+ <!-- 璐ㄩ噺灞炴�� -->
+ <u-picker :show="qualityShow" :columns="columns" @cancel="qualityShow = false" keyName="name" @confirm="onConfirm1"></u-picker>
</view>
</template>
<script>
import Warehouse from '../../components/Warehouse.vue'
import location from '../../components/location.vue'
+ import Material from '../../components/Material.vue'
+ import ProductionProcess from '../../components/ProductionProcess.vue'
export default {
- components: { Warehouse, location },
+ components: { Warehouse, location, Material, ProductionProcess },
data() {
return {
+ i: 0,
form: {
warehouseName: '',
warehouseId: '',
type: '',
typeName: ''
},
+ locationList: [],
+ productionList: [],
+ columns: [
+ [
+ { name: '鍚堟牸', id: '0' },
+ { name: '涓嶈壇', id: '1' },
+ { name: '鎶ュ簾', id: '2' }
+ ]
+ ],
list: [
{
batch: '',
@@ -125,10 +144,71 @@
typeList: [[{name: '閲囪喘鍏ュ簱', id: 25}, {name: '搴撳瓨璋冩暣', id: 28}]],
warehouseShow: false,
typeShow: false,
- locationShow: false
+ locationShow: false,
+ materialsShow: false,
+ productionShow: false,
+ qualityShow: false
};
},
methods: {
+ // 璐ㄩ噺灞炴�х‘璁�
+ onConfirm1(value) {
+ this.form.typeName = value.name
+ this.form.type = value.id
+ if (value.id == 25) {
+ this.list.forEach(item => {
+ item.procedureId = ''
+ item.procedureName = ''
+ })
+ }
+ this.typeShow = false
+ },
+ // 閫夋嫨鐗╂枡
+ getValue1(item) {
+ this.list[this.i].materialName = item.mmodelUnionName
+ this.list[this.i].materialId = item.id
+ this.list[this.i].unitId = item.unitId
+ this.list[this.i].hasBom = item.hasBom
+ this.list[this.i].unitName = item.umodelName
+ // 鑾峰彇鐗╂枡涓嬪伐搴�
+ getListByMaterialId({
+ materialId: item.id
+ }).then(res => {
+ if (res.code === 200) {
+ productionList.value = res.data
+ this.list[this.i].procedureId = ''
+ this.list[this.i].procedureName = ''
+ }
+ })
+ materialsShow.value = false
+ },
+ // 鍏抽棴浠撳簱閫夋嫨寮规
+ close1() {
+ this.materialsShow = false
+ },
+ // 閫夋嫨璐т綅
+ getValue3(item) {
+ this.list[this.i].locationId = item.id
+ this.list[this.i].locationName = item.unionName
+ this.list[this.i].qualityType = ''
+ this.list[this.i].qualityTypeName = ''
+ this.list[this.i].locationIdLabel = item.label
+ if (item.label === 'APPLIANCE_ONTEST') {
+ this.list[this.i].qualityType = '0'
+ this.list[this.i].qualityTypeName = '鍚堟牸'
+ } else if (item.label === 'APPLIANCE_OFFTEST') {
+ this.list[this.i].qualityType = '1'
+ this.list[this.i].qualityTypeName = '涓嶈壇'
+ } else if (item.label === 'APPLIANCE_USELESS') {
+ this.list[this.i].qualityType = '2'
+ this.list[this.i].qualityTypeName = '鎶ュ簾'
+ }
+ this.locationShow = false
+ },
+ // 鍏抽棴璐т綅閫夋嫨寮规
+ close3() {
+ this.locationShow = false
+ },
// 纭鍗曟嵁绫诲瀷
confirm(val) {
this.form.type = val.value[0].id
--
Gitblit v1.9.3