From d8d184a00d3581b3a77aa26864a153f0515524e0 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 29 八月 2023 18:30:03 +0800
Subject: [PATCH] 小程序
---
minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue | 77 +++++++++++++++++++++++++++++++-------
1 files changed, 63 insertions(+), 14 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue b/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
index f9a42cf..3217796 100644
--- a/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
+++ b/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
@@ -3,16 +3,16 @@
<view class="rework_list">
<view class="rework_list_item">
<text><b>*</b>鍗曟嵁绫诲瀷</text>
- <view class="rework_list_item_right">
+ <view class="rework_list_item_right" @click="typeShow = true">
<text :class="form.typeName ? 'black' : ''">{{form.typeName ? form.typeName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="rework_list_item">
<text><b>*</b>鍏ュ簱浠撳簱</text>
- <view class="rework_list_item_right">
+ <view class="rework_list_item_right" @click="warehouseShow = true">
<text :class="form.warehouseName ? 'black' : ''">{{form.warehouseName ? form.warehouseName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
@@ -33,14 +33,14 @@
<text><b>*</b>鍏ュ簱璐т綅</text>
<view class="rework_qd_item_right">
<text :class="item.locationName ? 'black' : ''">{{item.locationName ? item.locationName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="rework_qd_item">
<text><b>*</b>鍏ュ簱鐗╂枡</text>
<view class="rework_qd_item_right">
<text :class="item.materialName ? 'black' : ''">{{item.materialName ? item.materialName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<template v-if="form.type !== 25">
@@ -48,7 +48,7 @@
<text>鐢熶骇宸ュ簭</text>
<view class="rework_qd_item_right">
<text :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
</template>
@@ -56,19 +56,19 @@
<text><b>*</b>璐ㄩ噺灞炴��</text>
<view class="rework_qd_item_right">
<text :class="item.qualityTypeName ? 'black' : ''">{{item.qualityTypeName ? item.qualityTypeName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="rework_qd_item">
<text>鎵规鍙�</text>
<view class="rework_qd_item_right">
- <input type="text" v-model="item.batch" placeholder="璇疯緭鍏�" />
+ <u--input placeholder="璇疯緭鍏�" style="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">
- <input type="text" v-model="item.num" placeholder="0" />
+ <u--input placeholder="0" border="surround" v-model="item.num"></u--input>
</view>
</view>
</view>
@@ -82,11 +82,20 @@
<button class="rework_footer_submit">鎻愪氦</button>
</view>
<u-toast ref="uToast"></u-toast>
+ <!-- 浠撳簱 -->
+ <Warehouse :show="warehouseShow" @close="close" @value="getValue" />
+ <!-- 璐т綅 -->
+ <location :show="locationShow" @close="close1" @value="getValue1" />
+ <!-- 鍗曟嵁绫诲瀷 -->
+ <u-picker :show="typeShow" keyName="name" :columns="typeList" @confirm="confirm" @cancel="typeClose"></u-picker>
</view>
</template>
<script>
+ import Warehouse from '../../components/Warehouse.vue'
+ import location from '../../components/location.vue'
export default {
+ components: { Warehouse, location },
data() {
return {
form: {
@@ -95,10 +104,50 @@
type: '',
typeName: ''
},
- list: []
+ list: [
+ {
+ batch: '',
+ locationId: '',
+ locationIdLabel: '',
+ locationName: '',
+ materialId: '',
+ materialName: '',
+ num: '',
+ hasBom: '',
+ procedureId: '',
+ procedureName: '',
+ qualityType: '',
+ qualityTypeName: '',
+ unitId: '',
+ unitName: ''
+ }
+ ],
+ typeList: [[{name: '閲囪喘鍏ュ簱', id: 25}, {name: '搴撳瓨璋冩暣', id: 28}]],
+ warehouseShow: false,
+ typeShow: false,
+ locationShow: false
};
},
methods: {
+ // 纭鍗曟嵁绫诲瀷
+ confirm(val) {
+ this.form.type = val.value[0].id
+ this.form.typeName = val.value[0].name
+ this.typeShow = false
+ },
+ // 浠撳簱纭
+ getValue(val) {
+ this.form.warehouseName = val.name
+ this.form.warehouseId = val.id
+ this.warehouseShow = false
+ },
+ typeClose() {
+ this.typeShow = false
+ },
+ close() {
+ this.warehouseShow = false
+ },
+ // 娣诲姞鏄庣粏
addItem() {
if (!this.form.warehouseId) return this.$refs.uToast.show({ type: 'default', message: "璇烽�夋嫨鍏ュ簱浠撳簱" })
this.list.push({
@@ -133,12 +182,12 @@
<style lang="scss" scoped>
.rework {
width: 100%;
- height: 100%;
- position: absolute;
+ min-height: 100vh;
+ background-color: #F7F7F7;
.rework_list {
display: flex;
flex-direction: column;
- background: white;
+ background: #ffffff;
padding: 0 30rpx;
box-sizing: border-box;
.rework_list_item {
--
Gitblit v1.9.3