| | |
| | | </view> |
| | | <view class="zk_wl"> |
| | | <template v-if="view.MaterialList.length > 0"> |
| | | <van-swipe-cell v-for="(item, i) in view.MaterialList" :key="i"> |
| | | <view class="zk_wl_item"> |
| | | <view class="zk_wl_item" v-for="(item, i) in view.MaterialList" :key="i"> |
| | | <image class="shanchu" src="@/static/chuku_ic_delete@2x.png" mode="widthFix" @click="dele(i)"></image> |
| | | <text>{{item.materialName}}|{{item.materialCode}}</text> |
| | | <text> |
| | | <text class="green" v-if="item.qualityType === '0'">合格</text> |
| | | <text class="yellow" v-if="item.qualityType === '1'">不良</text> |
| | | <text class="red" v-if="item.qualityType === '2'">报废</text> |
| | | | <text>{{item.procedureName ? item.procedureName : '-'}} | </text> |
| | | <text class="green" v-if="item.qualityType === '0'">合格 |</text> |
| | | <text class="yellow" v-if="item.qualityType === '1'">不良 |</text> |
| | | <text class="red" v-if="item.qualityType === '2'">报废 |</text> |
| | | <text>{{item.procedureName ? item.procedureName : '-'}} | </text> |
| | | <text>{{item.batch ? item.batch : '-'}}</text> |
| | | </text> |
| | | <text>货位:{{item.locationName}}</text> |
| | | <view class="zk_wl_item_num"> |
| | | <text>转出数量({{item.unitName}}):</text> |
| | | <text>货位:{{item.locationName}}</text> |
| | | <view class="zk_wl_item_input"> |
| | | <text>数量:</text> |
| | | <input type="number" v-model="item.total" placeholder="0" /> |
| | | <text>{{item.unitName}}</text> |
| | | </view> |
| | | </view> |
| | | <template #right> |
| | | <van-button square type="danger" style="height: 100%;" text="删除" @click="dele(i)" /> |
| | | </template> |
| | | </van-swipe-cell> |
| | | </view> |
| | | </template> |
| | | <view class="zk_wl_w" v-else> |
| | | <text>暂无数据</text> |
| | |
| | | <!-- 选择仓库 --> |
| | | <Warehouse :show="view.Warehouse" @close="view.Warehouse = false" @value="getValue" /> |
| | | <!-- 选择物料 --> |
| | | <SelectMultipleMaterial ref="SelectMultipleMaterial" /> |
| | | <multipleMaterial |
| | | :warehouseId="data.exWarehouseId.toString()" |
| | | :warehouseQualityType="view.warehouseQualityType" |
| | | :selected="view.MaterialList.map(item => item.id)" |
| | | @value="getValueWL" |
| | | ref="multipleMaterial" /> |
| | | <!-- 单据类型 --> |
| | | <u-picker :show="view.type" :columns="view.documentTypeDate" keyName="name" @cancel="onCancel" @confirm="onConfirm"></u-picker> |
| | | </view> |
| | |
| | | <script> |
| | | import { setTime } from '@/util/utils.js' |
| | | import { documentType } from '@/util/constData.js' |
| | | import SelectMultipleMaterial from '@/components/SelectMultipleMaterial.vue' |
| | | import multipleMaterial from '../../components/multipleMaterial.vue' |
| | | import Warehouse from '../../components/Warehouse.vue' |
| | | import { createZK } from '@/util/api/agencyAPI' |
| | | |
| | | export default { |
| | | components: { |
| | | SelectMultipleMaterial, |
| | | multipleMaterial, |
| | | Warehouse |
| | | }, |
| | | data() { |
| | |
| | | { name: '废品入库', id: 30 } |
| | | ] |
| | | ], |
| | | warehouseQualityType: '', |
| | | customFieldName: { |
| | | text: 'name' |
| | | } |
| | | warehouseQualityType: '' |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 删除物料 |
| | | dele(i) { |
| | | this.view.MaterialList.splice(i, 1) |
| | | }, |
| | | // 仓库回调 |
| | | getValue(val) { |
| | | if (this.view.status === 'c') { |
| | | if (this.data.exWarehouseId !== val.id) { |
| | | this.view.MaterialList = [] |
| | | } |
| | | this.data.exWarehouse = val.name |
| | | this.data.exWarehouseId = val.id |
| | | this.data.outUserId = val.managerId |
| | |
| | | this.view.warehouseQualityType = val.tmodel.label |
| | | } |
| | | this.view.Warehouse = false |
| | | }, |
| | | // 物料回调 |
| | | getValueWL(val) { |
| | | val.forEach(element => { |
| | | element.total = element.num |
| | | }) |
| | | this.view.MaterialList.push(...val) |
| | | this.view.Material = false |
| | | }, |
| | | // 确认单据类型 |
| | | onConfirm(val) { |
| | |
| | | proceduresId: element.procedureId, |
| | | inLocationId: null, |
| | | outLocationId: element.locationId, |
| | | inWarehouseId: data.exWarehouseId, |
| | | outWarehouseId: data.warehousingWarehouse |
| | | inWarehouseId: this.data.exWarehouseId, |
| | | outWarehouseId: this.data.warehousingWarehouse |
| | | }) |
| | | }) |
| | | createZK({ |
| | |
| | | wtransferDetailBeanList |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: '创建成功!', icon: 'none', duration: 2000 }); |
| | | uni.showToast({ title: '创建成功!', icon: 'success', duration: 2000 }); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | }, 2000) |
| | |
| | | // const { selected } = Material.value |
| | | // Material.value.selected = arr |
| | | // view.Material = true |
| | | this.$refs.SelectMultipleMaterial.open({}) |
| | | this.$refs.multipleMaterial.open() |
| | | } else { |
| | | uni.showToast({ title: '请先选择入库仓库', icon: 'none', duration: 2000 }); |
| | | } |
| | |
| | | flex-direction: column; |
| | | padding: 30rpx; |
| | | border-bottom: 1rpx solid #e2e2e2; |
| | | position: relative; |
| | | |
| | | .shanchu { |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | .zk_wl_item_num { |
| | | display: flex; |
| | |
| | | justify-content: space-between; |
| | | margin-top: 30rpx; |
| | | |
| | | .zk_wl_item_input { |
| | | display: flex; |
| | | align-items: center; |
| | | text { |
| | | font-size: 28rpx; |
| | | font-size: 26rpx; |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | text { |
| | | font-size: 26rpx; |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | margin: 0 !important; |
| | | } |
| | | |
| | | input { |
| | | width: 180rpx; |
| | | width: 140rpx; |
| | | height: 60rpx; |
| | | background: #FFFFFF; |
| | | border-radius: 8rpx; |
| | |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | z-index: 999; |
| | | padding-bottom: 68rpx; |
| | | display: flex; |
| | | align-items: center; |