| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="rework"> |
| | | <view class="rework_list"> |
| | | <view class="rework_list_item"> |
| | | <text><b>*</b>åæ®ç±»å</text> |
| | | <view class="rework_list_item_right" @click="typeShow = true"> |
| | | <text :class="form.typeName ? 'black' : ''">{{form.typeName ? form.typeName : 'è¯·éæ©'}}</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="rework_list_item"> |
| | | <text><b>*</b>å
¥åºä»åº</text> |
| | | <view class="rework_list_item_right" @click="warehouseShow = true"> |
| | | <text :class="form.warehouseName ? 'black' : ''">{{form.warehouseName ? form.warehouseName : 'è¯·éæ©'}}</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="rework_qd"> |
| | | <view class="rework_qd_title"> |
| | | <view class="rework_qd_title_left"> |
| | | <view class="x"></view> |
| | | <text>å
¥åºç©ææ¸
å</text> |
| | | </view> |
| | | <view class="rework_qd_title_right" @click="addItem()"> |
| | | <image src="@/static/gongdan_ic_shoudong@2x.png" mode="widthFix"></image> |
| | | <text>å¢å å
¥åº</text> |
| | | </view> |
| | | </view> |
| | | <u-swipe-action :autoClose="true"> |
| | | <u-swipe-action-item v-for="(item, index) in list" :key="index" @click="dele($event, index)" :options="item.options"> |
| | | <view class="rework_qd_list"> |
| | | <view class="rework_qd_item" @click="openL(index)"> |
| | | <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" @click="openMaterial(index)"> |
| | | <text><b>*</b>å
¥åºç©æ</text> |
| | | <view class="rework_qd_item_right"> |
| | | <text :class="item.materialName ? 'black' : ''">{{item.materialName ? item.materialName : 'è¯·éæ©'}}</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | <template v-if="form.type !== 25"> |
| | | <view class="rework_qd_item" @click="openGX(index)"> |
| | | <text>ç产工åº</text> |
| | | <view class="rework_qd_item_right"> |
| | | <text :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : 'è¯·éæ©'}}</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="rework_qd_item" @click="openQ(index)"> |
| | | <text><b>*</b>è´¨é屿§</text> |
| | | <view class="rework_qd_item_right"> |
| | | <text :class="item.qualityTypeName ? 'black' : ''">{{item.qualityTypeName ? item.qualityTypeName : 'è¯·éæ©'}}</text> |
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="rework_qd_item"> |
| | | <text>æ¹æ¬¡å·</text> |
| | | <view class="rework_qd_item_right"> |
| | | <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" inputAlign="right" :customStyle="{width: '230rpx'}" border="surround" v-model="item.num"></u--input> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </view> |
| | | <view class="rework_zw"></view> |
| | | <!-- åºé¨æä½æé® --> |
| | | <view class="rework_footer"> |
| | | <button class="rework_footer_submit" @click="onConfirm()">æäº¤</button> |
| | | </view> |
| | | <u-toast ref="uToast"></u-toast> |
| | | <!-- ä»åº --> |
| | | <Warehouse :show="warehouseShow" @close="close" @value="getValue" /> |
| | | <<<<<<< HEAD |
| | | <!-- ç©æ --> |
| | | <Material :show="materialsShow" @close="close1" @value="getValue1" /> |
| | | <!-- è´§ä½ --> |
| | | <location :show="locationShow" :list="locationList" @close="close3" @value="getValue3" /> |
| | | <!-- å·¥åº --> |
| | | <ProductionProcess :show="productionShow" :list="productionList" @close="productionShow = false" @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> |
| | | ======= |
| | | >>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import Warehouse from '../../components/Warehouse.vue' |
| | | <<<<<<< HEAD |
| | | import location from '../../components/location.vue' |
| | | import Material from '../../components/Material.vue' |
| | | import ProductionProcess from '../../components/ProductionProcess.vue' |
| | | import { getListByWarehouseId, wOutBoundForStockUp } from '@/util/api/WorkOrderAPI' |
| | | import { getListByMaterialId } from '@/util/api/ExWarehouse' |
| | | export default { |
| | | components: { Warehouse, location, Material, ProductionProcess }, |
| | | ======= |
| | | export default { |
| | | components: { Warehouse }, |
| | | >>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f |
| | | data() { |
| | | return { |
| | | i: 0, |
| | | form: { |
| | | warehouseName: '', |
| | | warehouseId: '', |
| | | type: '', |
| | | typeName: '' |
| | | }, |
| | | <<<<<<< HEAD |
| | | locationList: [], |
| | | productionList: [], |
| | | columns: [ |
| | | [ |
| | | { name: 'åæ ¼', id: '0' }, |
| | | { name: 'ä¸è¯', id: '1' }, |
| | | { name: 'æ¥åº', id: '2' } |
| | | ] |
| | | ], |
| | | list: [ |
| | | { |
| | | batch: '', |
| | | locationId: '', |
| | | locationIdLabel: '', |
| | | locationName: '', |
| | | materialId: '', |
| | | materialName: '', |
| | | num: '', |
| | | hasBom: '', |
| | | procedureId: '', |
| | | procedureName: '', |
| | | qualityType: '', |
| | | qualityTypeName: '', |
| | | unitId: '', |
| | | unitName: '', |
| | | options: [ |
| | | { |
| | | text: 'å é¤', |
| | | style: { |
| | | backgroundColor: '#f56c6c' |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | typeList: [[{name: 'éè´å
¥åº', id: 25}, {name: 'åºåè°æ´', id: 28}]], |
| | | warehouseShow: false, |
| | | typeShow: false, |
| | | locationShow: false, |
| | | materialsShow: false, |
| | | productionShow: false, |
| | | qualityShow: false |
| | | }; |
| | | }, |
| | | methods: { |
| | | dele(e, index) { |
| | | if (this.list.length === 1) return uni.showToast({ title: 'è¯·éæ©åæ®ç±»å', icon: 'none', duration: 2000 }); |
| | | this.list.splice(index, 1) |
| | | }, |
| | | // éæ©å·¥åº |
| | | getValue4(item) { |
| | | this.list[this.i].procedureId = item.id |
| | | this.list[this.i].procedureName = item.name |
| | | this.productionShow = false |
| | | }, |
| | | // æäº¤ |
| | | onConfirm() { |
| | | if (!this.form.type) return uni.showToast({ title: 'è¯·éæ©åæ®ç±»å', icon: 'none', duration: 2000 }); |
| | | if (!this.form.warehouseId) return uni.showToast({ title: 'è¯·éæ©å
¥åºä»åº', icon: 'none', duration: 2000 }); |
| | | if (this.list.length === 0) return uni.showToast({ title: '请å
æ·»å å
¥åºç©æ', icon: 'none', duration: 2000 }); |
| | | for (let i = 0; i < this.list.length; i++) { |
| | | if (!this.list[i].locationId) return uni.showToast({ title: `第${i+1}项å
¥åºè´§ä½ä¸è½ä¸ºç©º`, icon: 'none', duration: 2000 }); |
| | | if (!this.list[i].materialId) return uni.showToast({ title: `第${i+1}项å
¥åºç©æä¸è½ä¸ºç©º`, icon: 'none', duration: 2000 }); |
| | | if (!this.list[i].qualityType) return uni.showToast({ title: `第${i+1}项质é屿§ä¸è½ä¸ºç©º`, icon: 'none', duration: 2000 }); |
| | | if (this.list[i].num <= 0) { |
| | | return uni.showToast({ title: `第${i + 1}项å
¥åºæ°éå¿
须大äº0`, icon: 'none', duration: 2000 }); |
| | | } |
| | | } |
| | | wOutBoundForStockUp({ |
| | | type: this.form.type, |
| | | planDate: this.getDay(), |
| | | validDate: this.getDay(), |
| | | warehouseId: this.form.warehouseId, |
| | | woutboundInBodyBeanList: this.list |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | uni.showToast({ title: 'å
¥åºæå', icon: 'success', duration: 2000 }); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | }, 2000) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åå½å¤©å¹´ææ¥ |
| | | getDay() { |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var day = date.getDate(); |
| | | return `${year}-${month <= 9 ? `0${month}` : month}-${day <= 9 ? `0${day}` : day}` |
| | | }, |
| | | // æå¼éæ©ç©æ |
| | | openQ(index) { |
| | | if (this.list[index].locationIdLabel == 'APPLIANCE_ONTEST' || this.list[index].locationIdLabel == 'APPLIANCE_OFFTEST' || this.list[index].locationIdLabel == 'APPLIANCE_USELESS') { |
| | | return |
| | | } |
| | | this.i = index |
| | | this.qualityShow = true |
| | | }, |
| | | // æå¼å·¥åº |
| | | openGX(index) { |
| | | if (!this.list[index].materialId) return uni.showToast({ title: '请å
éæ©å
¥åºç©æ', icon: 'none', duration: 2000 }); |
| | | this.i = index |
| | | this.productionShow = true |
| | | }, |
| | | // æå¼éæ©è´§ä½ |
| | | openL(index) { |
| | | if (!this.form.warehouseId) return uni.showToast({ title: 'è¯·éæ©å
¥åºä»åº', icon: 'none', duration: 2000 }); |
| | | this.i = index |
| | | this.locationShow = true |
| | | }, |
| | | // æå¼éæ©ç©æ |
| | | openMaterial(index) { |
| | | this.i = index |
| | | this.materialsShow = true |
| | | }, |
| | | // è´¨é屿§ç¡®è®¤ |
| | | onConfirm1(value) { |
| | | this.list[this.i].qualityType = value.value[0].id |
| | | this.list[this.i].qualityTypeName = value.value[0].name |
| | | this.qualityShow = 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) { |
| | | this.productionList = res.data |
| | | this.list[this.i].procedureId = '' |
| | | this.list[this.i].procedureName = '' |
| | | } |
| | | }) |
| | | this.materialsShow = 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 |
| | | this.form.typeName = val.value[0].name |
| | | if (val.value[0].id == 25) { |
| | | this.list.forEach(item => { |
| | | item.procedureId = '' |
| | | item.procedureName = '' |
| | | }) |
| | | } |
| | | this.typeShow = false |
| | | }, |
| | | // ä»åºç¡®è®¤ |
| | | getValue(val) { |
| | | this.form.warehouseName = val.name |
| | | this.form.warehouseId = val.id |
| | | getListByWarehouseId({ wareHouseId: val.id }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.locationList = res.data |
| | | if (res.data.length === 1) { |
| | | this.location = false |
| | | this.list.forEach(item => { |
| | | item.locationId = res.data[0].id |
| | | item.locationName = res.data[0].unionName |
| | | }) |
| | | this.list[this.i].locationIdLabel = res.data[0].label |
| | | if (res.data[0].label === 'APPLIANCE_ONTEST') { |
| | | this.list[this.i].qualityType = '0' |
| | | this.list[this.i].qualityTypeName = 'åæ ¼' |
| | | } else if (res.data[0].label === 'APPLIANCE_OFFTEST') { |
| | | this.list[this.i].qualityType = '1' |
| | | this.list[this.i].qualityTypeName = 'ä¸è¯' |
| | | } else if (res.data[0].label === 'APPLIANCE_USELESS') { |
| | | this.list[this.i].qualityType = '2' |
| | | this.list[this.i].qualityTypeName = 'æ¥åº' |
| | | } |
| | | } else { |
| | | this.location = true |
| | | this.list.forEach(item => { |
| | | item.locationId = res.data[0].id |
| | | item.locationName = res.data[0].unionName |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | this.warehouseShow = false |
| | | }, |
| | | typeClose() { |
| | | this.typeShow = false |
| | | }, |
| | | ======= |
| | | list: [], |
| | | warehouseShow: false |
| | | }; |
| | | }, |
| | | methods: { |
| | | getValue(val) { |
| | | this.warehouseShow = false |
| | | }, |
| | | >>>>>>> 89d77a7cd7285feda993bffec2513892f8bd355f |
| | | close() { |
| | | this.warehouseShow = false |
| | | }, |
| | | // æ·»å æç» |
| | | addItem() { |
| | | if (!this.form.warehouseId) return this.$refs.uToast.show({ type: 'default', message: "è¯·éæ©å
¥åºä»åº" }) |
| | | this.list.unshift({ |
| | | batch: '', |
| | | locationId: this.list[this.list.length - 1].locationId, |
| | | locationName: this.list[this.list.length - 1].locationName, |
| | | locationIdLabel: this.list[this.list.length - 1].locationIdLabel, |
| | | materialId: '', |
| | | materialName: '', |
| | | num: '', |
| | | hasBom: '', |
| | | procedureId: '', |
| | | procedureName: '', |
| | | qualityType: this.list[this.list.length - 1].qualityType, |
| | | qualityTypeName: this.list[this.list.length - 1].qualityTypeName, |
| | | unitId: '', |
| | | unitName: '', |
| | | options: [ |
| | | { |
| | | text: 'å é¤', |
| | | style: { |
| | | backgroundColor: '#f56c6c' |
| | | } |
| | | } |
| | | ] |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .u-swipe-action-item__right { |
| | | z-index: 9; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .rework { |
| | | width: 100%; |
| | | min-height: 100vh; |
| | | background-color: #F7F7F7; |
| | | .rework_list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: #ffffff; |
| | | padding: 0 30rpx; |
| | | box-sizing: border-box; |
| | | .rework_list_item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | height: 98rpx; |
| | | border-bottom: 1rrpx solid #E5E5E5; |
| | | &:last-child { |
| | | border: none; |
| | | } |
| | | text { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | flex-shrink: 0; |
| | | b { |
| | | font-size: 30rpx; |
| | | color: red; |
| | | margin-right: 5rpx; |
| | | } |
| | | } |
| | | .rework_list_item_right { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .black { |
| | | color: black !important; |
| | | } |
| | | input { |
| | | width: 230rpx; |
| | | height: 60rpx; |
| | | font-size: 28rpx; |
| | | border-radius: 8rpx; |
| | | padding: 0 30rpx; |
| | | text-align: right; |
| | | box-sizing: border-box; |
| | | border: 1rpx solid #CCCCCC; |
| | | } |
| | | input::-webkit-input-placeholder { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #B2B2B2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .rework_qd { |
| | | margin-top: 40rpx; |
| | | width: 100%; |
| | | background: #F7F7F7; |
| | | .rework_qd_title { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 30rpx 30rpx 30rpx; |
| | | .rework_qd_title_left { |
| | | display: flex; |
| | | align-items: center; |
| | | text { |
| | | font-size: 32rpx; |
| | | font-weight: 500; |
| | | color: #222222; |
| | | } |
| | | .x { |
| | | width: 8rpx; |
| | | height: 30rpx; |
| | | background: #4275FC; |
| | | border-radius: 2rpx; |
| | | margin-right: 12rpx; |
| | | } |
| | | } |
| | | .rework_qd_title_right { |
| | | display: flex; |
| | | align-items: center; |
| | | image { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | margin-right: 12rpx; |
| | | } |
| | | text { |
| | | font-size: 28rpx; |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | | font-weight: 400; |
| | | color: #4275FC; |
| | | } |
| | | } |
| | | } |
| | | .rework_qd_list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | padding: 0 30rpx; |
| | | background: #FFFFFF; |
| | | box-sizing: border-box; |
| | | margin-bottom: 30rpx; |
| | | .rework_qd_item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | height: 98rpx; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | &:last-child { |
| | | border: none; |
| | | } |
| | | text { |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | flex-shrink: 0; |
| | | b { |
| | | font-size: 30rpx; |
| | | color: red; |
| | | margin-right: 5rpx; |
| | | } |
| | | } |
| | | .rework_qd_item_right { |
| | | display: flex; |
| | | align-items: center; |
| | | text { |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #999999; |
| | | } |
| | | .black { |
| | | color: black !important; |
| | | } |
| | | input { |
| | | width: 230rpx; |
| | | height: 60rpx; |
| | | font-size: 28rpx; |
| | | border-radius: 8rpx; |
| | | padding: 0 30rpx; |
| | | text-align: right; |
| | | box-sizing: border-box; |
| | | border: 1rpx solid #CCCCCC; |
| | | } |
| | | input::-webkit-input-placeholder { /* WebKit browsers */ |
| | | font-size: 28rpx; |
| | | font-weight: 400; |
| | | color: #B2B2B2; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .rework_zw { |
| | | height: 168rpx; |
| | | } |
| | | .rework_footer { |
| | | width: calc(100% - 60rpx); |
| | | position: fixed; |
| | | bottom: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 30rpx 68rpx 30rpx; |
| | | .rework_footer_add { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | color: $nav-color; |
| | | background: #FFFFFF; |
| | | box-shadow: 0 0 12rpx 0 rgba(0,0,0,0.0800); |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .rework_footer_submit { |
| | | flex: 1; |
| | | height: 88rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | color: #ffffff; |
| | | background: $nav-color; |
| | | box-shadow: 0 0 12rpx 0 rgba(0,0,0,0.0800); |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: none; |
| | | } |
| | | } |
| | | } |
| | | </style> |