| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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: { |
| | |
| | | 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({ |
| | |
| | | <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 { |