| | |
| | | "version" : "1.0", |
| | | "configurations" : [ |
| | | { |
| | | "playground" : "standard", |
| | | "playground" : "custom", |
| | | "type" : "uni-app:app-android" |
| | | }, |
| | | { |
| | |
| | | export const InFactoryCheckItem = (data, config = {}) => http.get( |
| | | '/AppQualityManagement/InFactoryCheckItem' + |
| | | data, config) |
| | | |
| | | |
| | | //ä»ä½æ¥è¯¢ä»åº |
| | | export const WarehouseLocationSearchStoreHouse = (data, config = {}) => http.get( |
| | | '/GeneralBasicData/WarehouseLocationSearchStoreHouse', { |
| | | params: data |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | //éè´å
¥åºæäº¤ |
| | | export const MesAppPurchInStorSave = (data1, data2, config = {}) => http.post( |
| | | '/AppPurchManagement/MesAppPurchInStorSave' + data1, data2, config) |
| | |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/wlgl/cgrk4", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å
¥åº", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wlgl/cgdh", |
| | |
| | | data() { |
| | | return { |
| | | // #ifdef H5 |
| | | usercode: '', |
| | | usercode: '001', |
| | | // #endif |
| | | |
| | | // #ifdef APP-PLUS |
| | | usercode: '', |
| | | usercode: '999', |
| | | // #endif |
| | | |
| | | userpassword: '', |
| | | userpassword: '123', |
| | | isView: false, //å¯ç æ¯å¦å¯è§ |
| | | |
| | | isDisabledSubmitButton: false, //æäº¤æé®æ¯å¦å¤äºå è½½ä¸ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="éè´å
¥åº1"></page-nav> |
| | | <view class="body" style="flex-direction: column;"> |
| | | <u-button type="primary" icon='plus-circle' size='large' style="width: 96%;margin-left: 2%;margin-top: 70%;" |
| | | :plain="true" :hairline="true" @click="navigateTo" text="éæ©éè´è®¢å"></u-button> |
| | | |
| | | <u-button type="primary" icon='scan' size='large' style="width: 96%;margin-left: 2%;margin-top: 4%;" |
| | | :plain="true" :hairline="true" @click="navigateTo2" text="æ«æå°è´§æ ç¾"></u-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | |
| | | // } from '../../config/api.js'; |
| | | const App = getApp() |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | }, |
| | | methods: { |
| | | navigateTo() { |
| | | uni.navigateTo({ |
| | | url: './cgrk2' //éæ©éè´è®¢å |
| | | }); |
| | | }, |
| | | navigateTo2() { |
| | | uni.navigateTo({ |
| | | url: './cgrk3' //æ«æå°è´§æ ç¾ |
| | | }); |
| | | }, |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | .body { |
| | | background-color: #f6f7fb !important; |
| | | width: 100%; |
| | | height: 1400rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | |
| | | .u-button--large { |
| | | position: relative; |
| | | } |
| | | |
| | | ::v-deep .uicon-plus-circle { |
| | | font-size: 32rpx !important; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="éè´å
¥åº2"></page-nav> |
| | | |
| | | |
| | | <view v-if="purchorderArrAll.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="boxImg"></div> |
| | | <div class="scanText">ææ éè´å°è´§</div> |
| | | </div> |
| | | </view> |
| | | |
| | | |
| | | <view v-if="purchorderArrAll.length>0"> |
| | | <!-- <view class="mainContent" :style="{maxHeight: '1340rpx',overflow: 'scroll',padding:0}"> --> |
| | | <u--input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" placeholder="è¾å
¥éè´è®¢åå·" |
| | | clearable border="surround" @clear='inputBoxValueClear' v-model="inputBoxValue" |
| | | @change="changeInputBoxValue"></u--input> |
| | | |
| | | <u-alert :title="'éè´è®¢åæ°ï¼å
±'+title+'个ï¼'" type="primary"></u-alert> |
| | | |
| | | <u-radio-group v-model="radioValue" iconPlacement="right" @change="radioValueClick" class="radioGroupClass"> |
| | | <view v-for="(item,index) in purchorderArr" :key="item.ordercode"> |
| | | <!-- @click="radioValueClick(item.code)" --> |
| | | <view> |
| | | <u-radio activeColor="red" size="18" labelSize='18' :name='item.ordercode' |
| | | :label="item.ordercode"></u-radio> |
| | | </view> |
| | | <u-line v-if="index!==purchorderArr.length-1" color="#2979ff"></u-line> |
| | | </view> |
| | | </u-radio-group> |
| | | |
| | | <view class="footer" style="min-height:62rpx;"> |
| | | <u-button type="primary" size='large' :hairline="true" @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | </view> |
| | | <!-- </view> --> |
| | | </view> |
| | | |
| | | |
| | | <view v-if="purchorderArrAll.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="boxImg"></div> |
| | | <div class="scanText">ææ éè´å°è´§</div> |
| | | </div> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | MesAppPurchInStorSelectCGOrder |
| | | } from '../../config/api.js'; |
| | | const App = getApp() |
| | | export default { |
| | | onLoad(option) {}, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | inputBoxValue: '', //è¾å
¥æ¡å¼ |
| | | |
| | | title: 0, |
| | | |
| | | |
| | | radioValue: '', |
| | | |
| | | purchorderArr: [], |
| | | |
| | | purchorderArrAll: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | this.getMesAppPurchOrderSearch() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | changeInputBoxValue(val) { |
| | | this.purchorderArr = this.purchorderArrAll.filter((p) => { |
| | | return p.ordercode.indexOf(val) !== -1 |
| | | }) |
| | | }, |
| | | inputBoxValueClear() { |
| | | this.inputBoxValue = '' |
| | | }, |
| | | radioValueClick(val) { |
| | | console.log(val) |
| | | this.radioValue = val |
| | | }, |
| | | navigateTo() { |
| | | uni.navigateTo({ |
| | | url: './cgrk4?ordercode=' + this.radioValue |
| | | }); |
| | | }, |
| | | async getMesAppPurchOrderSearch() { |
| | | const res = await MesAppPurchInStorSelectCGOrder() |
| | | |
| | | this.purchorderArrAll = res.data |
| | | |
| | | this.purchorderArr = res.data |
| | | |
| | | this.title = res.data.length |
| | | |
| | | this.radioValue = res.data[0].ordercode |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | .u-input--square { |
| | | margin: 20rpx 10rpx; |
| | | border-radius: 40rpx; |
| | | background-color: #fff; |
| | | border: 1px solid #c8c8c8; |
| | | } |
| | | |
| | | ::v-deep .u-alert__text--primary--light { |
| | | margin-bottom: 0; |
| | | font-size: 32rpx !important; |
| | | } |
| | | |
| | | .radioGroupClass { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #fff; |
| | | |
| | | overflow-y: auto; |
| | | max-height: 1140rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | ::v-deep .u-radio-label--right { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | // padding: 0 50rpx; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="éè´å
¥åº3"></page-nav> |
| | | |
| | | |
| | | |
| | | <view v-if="purchorderArr.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æç©ææ ç¾</div> |
| | | </div> |
| | | </view> |
| | | |
| | | <view v-if='purchorderArr.length!==0' class="mainContent" style=""> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | |
| | | <view style="max-height: 940rpx;overflow: auto;"> |
| | | |
| | | <view class="head" style="position: relative;"> |
| | | |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class=" flex_column" style="width: 100%;" @click="radioValueClick(item.hbarcode)" |
| | | v-for="(item,index) in purchorderDetailArr" :key="item.hbarcode"> |
| | | |
| | | |
| | | <view class="head_block" style="position: absolute;margin: 38rpx 0 0 0;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | æ ç¾ä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="orderNumber" :key="item.hbarcode"> |
| | | {{(index+1).toString().padStart(2,0)}} |
| | | </view> |
| | | |
| | | <view class="trash" v-show="purchorderDetailArr.length>1" |
| | | @click="trashClick(index)"> |
| | | <u-icon name="trash" size='20'></u-icon> |
| | | </view> |
| | | |
| | | <view v-show="purchorderDetailArr.length===1" style="width: 48rpx;height: 48rpx;"> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="flex_between marginBottom20 marginLeft20 marginTop20"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>ç©ææ ç¾ï¼</view> |
| | | <view>æ ç¾æ°éï¼</view> |
| | | <view>便¹ä¿¡æ¯ï¼</view> |
| | | <view>éè´æ¹æ¬¡ï¼</view> |
| | | <view>è´¨éç¶æï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.hbarcode}}</view> |
| | | <view>{{item.hqty}}</view> |
| | | <view class="ellipsis" style="width: 460rpx;">{{item.hcustomername}} |
| | | </view> |
| | | <view>{{item.hbatchno}}</view> |
| | | <!-- <view>{{item.qualitystatus?item.qualitystatus:'/'}}</view> --> |
| | | <view v-if="item.qualitystatus===null">/</view> |
| | | <view v-else style="display: flex;align-items: center;"> |
| | | <!-- <u-icon |
| | | :name="item.qualitystatus==='OK'?'checkmark-circle-fill':'close-circle-fill'" |
| | | :color="item.qualitystatus==='OK'?'#55ff00':'#FF0000'" |
| | | size="40"></u-icon> |
| | | <view style="margin-left: 10rpx;"> |
| | | {{item.qualitystatus==='OK'?'åæ ¼':'ä¸åæ ¼'}} |
| | | </view> --> |
| | | |
| | | <u-icon name="more-circle-fill" color="#55aaff" size="20"></u-icon> |
| | | <view style="margin-left: 10rpx;"> |
| | | å¾
æ£ |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-radio size='20' class="marginRight20" :key="item.hbarcode" |
| | | :name="item.hbarcode" activeColor="red"></u-radio> |
| | | </view> |
| | | |
| | | <u-gap height="10" v-if="index!==purchorderDetailArr.length-1" |
| | | bgColor="#eff0f1"></u-gap> |
| | | |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view v-if='purchorderArr.length!==0' class="footer"> |
| | | <view class="head_block" style="align-items: center;padding: 0 23rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | éæ©è´¨æ£æ¹æ¡ |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_center" style="margin-right: 20rpx;"> |
| | | <view @click='sheetClick' class="custominputClass"> |
| | | |
| | | <view v-show='sheetValue===""' style="color: rgb(192, 196, 204);">è¯·éæ©</view> |
| | | <view v-show='sheetValue!==""' class="ellipsis" style="width: 390rpx;"> |
| | | {{sheetValue}} |
| | | </view> |
| | | |
| | | <u-icon :name="!sheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> --> |
| | | |
| | | <u-picker :show="sheetShow" :columns="columns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='sheetShow=false' @confirm='pickerConfirm' @cancel='sheetShow=false'></u-picker> |
| | | |
| | | |
| | | <view class="footer"> |
| | | |
| | | <u-button :disabled="!sheetValue" v-if='purchorderArr.length!==0' type="primary" size='large' |
| | | :hairline="true" @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | </view> |
| | | |
| | | |
| | | <!-- <scan-code></scan-code> --> |
| | | |
| | | <!-- æ¬æµ®ç --> |
| | | <!-- <view v-show="purchorderArr.length!==0&&!sheetShow" @click="topScanClick"> |
| | | <drag-ball :x='$DeviceInformation.screenWidth*0.8' :y="$DeviceInformation.screenHeight*0.7"></drag-ball> |
| | | </view> --> |
| | | |
| | | |
| | | |
| | | <!-- <navigator :url="'./rcjy2?item='+ encodeURIComponent(JSON.stringify(item))"> --> |
| | | <!-- <navigator :url="'./rcjy2?item='+encodeURIComponent(1)"> |
| | | </navigator> |
| | | --> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | MesAppPurchInStorScanLabCode |
| | | } from '../../config/api.js'; |
| | | // import scanCode from '@/components/scan-code/scan-code.vue' |
| | | const App = getApp() |
| | | export default { |
| | | // components: { |
| | | // scanCode |
| | | // }, |
| | | onLoad(option) { |
| | | |
| | | // if (option.length !== undefined) { |
| | | // let t1 = JSON.parse(uni.getStorageSync('purchorderArr')) |
| | | // let t2 = JSON.parse(uni.getStorageSync('purchorderDetailArr')) |
| | | // // æ¯å¦åæ¥æ¹æ¬¡ |
| | | // if (option.issyncbatch === 'true') { //æ¯ |
| | | // console.log('æ§è¡1') |
| | | // this.purchorderArr = t1.filter(i => { |
| | | // return !(i.hbillno === option.hbillno && i.partcode === option.partcode && i.hbatchno === |
| | | // option.hbatchno) |
| | | // }) |
| | | // this.purchorderDetailArr = t2.filter(i => { |
| | | // console.log(!(i.hbillno === option.hbillno && i.partcode === option.partcode && i |
| | | // .hbatchno === |
| | | // option.hbatchno)) |
| | | // return !(i.hbillno === option.hbillno && i.partcode === option.partcode && i.hbatchno === |
| | | // option.hbatchno) |
| | | // }) |
| | | |
| | | // } else if (option.issyncbatch === 'false') { //å¦ |
| | | // console.log('æ§è¡2') |
| | | // this.purchorderDetailArr = t2.filter(i => i.hbarcode !== option.labcode) |
| | | // this.purchorderArr = t1.filter(i => i.hbarcode !== option.labcode) |
| | | // } |
| | | // console.log('æ§è¡3') |
| | | // this.radioValue = this.purchorderDetailArr[0].hbarcode |
| | | // const t = this.purchorderDetailArr.find(i => i.hbarcode === this.radioValue).hbillno |
| | | // this.purchorderObj = this.purchorderArr.find(i => i.hbillno === t) |
| | | // this.$forceUpdate() |
| | | // } |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | |
| | | // "hbillno": "DH2303311361", //åæ®ç¼å· |
| | | // "partcode": "102", //产åç¼ç |
| | | // "partname": "å
å", //产ååç§° |
| | | // "partspec": "", //产åè§æ ¼ |
| | | // "hbarcode": "DH2303311360", //ç©ææ ç¾ |
| | | // "stocktype_code": "1", //åè´§ç±»åç¼ç |
| | | // "hqty": 300.00, //æ ç¾æ°é |
| | | // "hcustomercode": "0010002", //ä¾åºåç¼ç |
| | | // "hcustomername": "èæ£®å
è伯å卿ºç³»ç»ï¼å¸¸å·ï¼æéå
¬å¸", //ä¾åºååç§° |
| | | // "hbatchno": "2", //éè´æ¹æ¬¡ |
| | | // "qualitystatus": null //è´¨éç¶æ |
| | | |
| | | purchorderObj: {}, |
| | | purchorderArr: [ |
| | | // { |
| | | // hbillno: 'DH2304041465', |
| | | // partcode: 'ZG-Y-001', |
| | | // partname: 'ZGåææ001', |
| | | // partspec: '#001' |
| | | // }, |
| | | // { |
| | | // hbillno: 'DH2304041463', |
| | | // partcode: 'ZG-Y-002', |
| | | // partname: 'ZGåææ002', |
| | | // partspec: '#002' |
| | | // } |
| | | ], |
| | | purchorderDetailArr: [ |
| | | // { |
| | | // hbillno: 'DH2304041465', |
| | | // hbarcode: 'DH2304041464', |
| | | // hqty: 100, |
| | | // hcustomername: 'ZGå¤è´ä¾åºå', |
| | | // hbatchno: '#101', |
| | | // qualitystatus: 'NG' |
| | | // }, |
| | | // { |
| | | // hbillno: 'DH2304041463', |
| | | // hbarcode: 'DH2304041462', |
| | | // hqty: 400, |
| | | // hcustomername: 'ZGå¤è´ä¾åºå', |
| | | // hbatchno: '#101', |
| | | // qualitystatus: 'OK' |
| | | // }, |
| | | // { |
| | | // hbillno: 'DH2304041463', |
| | | // hbarcode: 'DH2304041461', |
| | | // hqty: 300, |
| | | // hcustomername: 'ZGå¤è´ä¾åºå', |
| | | // hbatchno: '#101', |
| | | // qualitystatus: 'NG' |
| | | // }, { |
| | | // hbillno: 'DH2304041463', |
| | | // hbarcode: 'DH2304041460', |
| | | // hqty: 200, |
| | | // hcustomername: 'ZGå¤è´ä¾åºå', |
| | | // hbatchno: '#101', |
| | | // qualitystatus: 'OK' |
| | | // }, |
| | | ], |
| | | radioValue: '', |
| | | |
| | | sheetShow: false, //䏿å表æ¯å¦å±å¼ |
| | | sheetValue: '', |
| | | sheetList: [], |
| | | columns: [] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | |
| | | |
| | | this.getMesAppPurchInStorScanLabCode('DH25050900016') |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | //æ¥èªäºé¡µé¢3çå¼ è¿è¡æ°æ®å¤ç |
| | | fromSubmitData(option) { |
| | | |
| | | let t1 = JSON.parse(uni.getStorageSync('purchorderArr')) |
| | | let t2 = JSON.parse(uni.getStorageSync('purchorderDetailArr')) |
| | | // æ¯å¦åæ¥æ¹æ¬¡ |
| | | if (option.issyncbatch === 'Y') { //æ¯ |
| | | console.log('æ§è¡1') |
| | | this.purchorderArr = t1.filter(i => { |
| | | return !(i.hbillno === option.hbillno && i.partcode === option.partcode && i.hbatchno === |
| | | option.hbatchno) |
| | | }) |
| | | this.purchorderDetailArr = t2.filter(i => { |
| | | return !(i.hbillno === option.hbillno && i.partcode === option.partcode && i.hbatchno === |
| | | option.hbatchno) |
| | | }) |
| | | |
| | | } else if (option.issyncbatch === 'N') { //å¦ |
| | | console.log('æ§è¡2') |
| | | this.purchorderDetailArr = t2.filter(i => i.hbarcode !== option.labcode) |
| | | this.purchorderArr = t1.filter(i => i.hbarcode !== option.labcode) |
| | | } |
| | | console.log('æ§è¡3') |
| | | if (this.purchorderDetailArr.length > 0) { |
| | | this.radioValue = this.purchorderDetailArr[0].hbarcode |
| | | const t = this.purchorderDetailArr.find(i => i.hbarcode === this.radioValue).hbillno |
| | | this.purchorderObj = this.purchorderArr.find(i => i.hbillno === t) |
| | | } |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | // æ«æ |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // scanType: ['barCode', 'qrCode'], |
| | | scanType: ['qrCode'], |
| | | success: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.scanContent = res.result; |
| | | let flag = false |
| | | that.purchorderDetailArr.forEach(item => { |
| | | if (item.hbarcode === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getMesAppPurchInStorScanLabCode(that.scanContent); |
| | | } |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | // è·åæ ç¾ä¿¡æ¯ |
| | | async getMesAppPurchInStorScanLabCode(labcode) { |
| | | const data = { |
| | | labcode |
| | | } |
| | | const res = await MesAppPurchInStorScanLabCode(this.global.formatData(data)) |
| | | |
| | | if (res.code === '200') { |
| | | console.log(res) |
| | | this.purchorderArr.unshift({ |
| | | hbillno: res.data[0].hbillno, |
| | | partcode: res.data[0].partcode, |
| | | partname: res.data[0].partname, |
| | | partspec: res.data[0].partspec, |
| | | hbarcode: res.data[0].hbarcode, |
| | | hbatchno: res.data[0].hbatchno ? res.data[0].hbatchno : '/', |
| | | }) |
| | | |
| | | this.purchorderDetailArr.unshift({ |
| | | hbillno: res.data[0].hbillno, |
| | | partcode: res.data[0].partcode, |
| | | hbarcode: res.data[0].hbarcode, |
| | | hqty: res.data[0].hqty, |
| | | hcustomername: res.data[0].hcustomername, |
| | | hcustomercode: res.data[0].hcustomercode, |
| | | hbatchno: res.data[0].hbatchno ? res.data[0].hbatchno : '/', |
| | | qualitystatus: res.data[0].qualitystatus, |
| | | }) |
| | | |
| | | this.purchorderObj = this.purchorderArr[0] |
| | | |
| | | this.radioValue = res.data.labcont[0].hbarcode |
| | | |
| | | } |
| | | }, |
| | | // picker确认æé® |
| | | pickerConfirm(val) { |
| | | this.sheetValue = val.value[0] |
| | | this.sheetShow = false |
| | | }, |
| | | // éæ©è´¨æ£æ¹æ¡ |
| | | sheetClick(val) { |
| | | this.sheetShow = true |
| | | }, |
| | | // 页é¢è·³è½¬ |
| | | navigateTo() { |
| | | |
| | | |
| | | uni.setStorageSync('purchorderArr', JSON.stringify(this.purchorderArr)) |
| | | uni.setStorageSync('purchorderDetailArr', JSON.stringify(this.purchorderDetailArr)) |
| | | |
| | | // uni.navigateTo({ |
| | | // url:'./rcjy2?purchorderObj=' + JSON.stringify(this.purchorderObj)+ |
| | | // }) |
| | | |
| | | |
| | | |
| | | uni.navigateTo({ |
| | | url: './rcjy2?checkstandcode=' + this.sheetList.find(i => i.name === this.sheetValue).code + |
| | | '&checkstandname=' + this.sheetValue + '&sampmethod=' + this.sheetList.find(i => i.name === |
| | | this.sheetValue).sampmethod + '&sampscare=' + this.sheetList.find(i => i.name === this |
| | | .sheetValue).sampscare + '&purchorderObj=' + JSON.stringify(this |
| | | .purchorderObj) + '&radioSelectValue=' + JSON.stringify(this.purchorderDetailArr.find( |
| | | i => i.hbarcode === this.radioValue)) |
| | | |
| | | |
| | | }); |
| | | }, |
| | | // åéæé®ç¹å»äºä»¶ |
| | | radioValueClick(val) { |
| | | this.radioValue = val |
| | | const t = this.purchorderDetailArr.find(i => i.hbarcode === val).hbillno |
| | | this.purchorderObj = this.purchorderArr.find(i => i.hbillno === t) |
| | | }, |
| | | // å é¤äºä»¶ç¹å» |
| | | trashClick(val) { |
| | | this.purchorderDetailArr.splice(val, 1) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | |
| | | |
| | | .orderNumber { |
| | | width: 60rpx; |
| | | height: 40rpx; |
| | | // margin: -22rpx 0 0 -30rpx; |
| | | background-color: #d3daf9; |
| | | color: #2979FF; |
| | | font-size: 26rpx; |
| | | padding: 4rpx 0 0 10rpx; |
| | | border-radius: 0 0 90% 0; |
| | | } |
| | | |
| | | .trash { |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | margin: -26rpx 0 0 646rpx; |
| | | background-color: #d3daf9; |
| | | font-size: 26rpx; |
| | | padding: 6rpx 0 0 10rpx; |
| | | border-radius: 100%; |
| | | } |
| | | |
| | | .custominputClass { |
| | | width: 424rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: 3rpx #eff0f1 solid; |
| | | border-radius: 10rpx; |
| | | padding: 0 10rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="éè´å
¥åº4"></page-nav> |
| | | |
| | | <view v-if='purchorderArr.length!==0' class="mainContent" style=""> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <!-- max-height: 1340rpx;overflow: auto; --> |
| | | <view style=""> |
| | | |
| | | <view class="head" style="position: relative;"> |
| | | |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class=" flex_column" style="width: 100%;" @click="radioValueClick(item.sbid)" |
| | | v-for="(item,index) in purchorderArr" :key="item.sbid"> |
| | | |
| | | <view class="head_block" style="position: absolute;margin: 38rpx 0 0 0;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | ç©æä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="orderNumber" :key="item.sbid"> |
| | | {{(index+1).toString().padStart(2,0)}} |
| | | </view> |
| | | |
| | | <view class="trash" v-show="purchorderArr.length>1" @click="trashClick(index)"> |
| | | <u-icon name="trash" size='20'></u-icon> |
| | | </view> |
| | | |
| | | <view v-show="purchorderArr.length===1" style="width: 48rpx;height: 48rpx;"> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="flex_between marginBottom20 marginLeft20 marginTop20"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>ç©æç¼ç ï¼</view> |
| | | <view>ç©æåç§°ï¼</view> |
| | | <view>ç©æè§æ ¼ï¼</view> |
| | | <view>éè´è®¢åï¼</view> |
| | | <view>å°è´§è¿åº¦ï¼</view> |
| | | <!-- <view>ç©ææ ç¾ï¼</view> --> |
| | | <view v-show="!item.arrowType">ç©ææ°éï¼</view> |
| | | <view v-show="!item.arrowType">便¹ä¿¡æ¯ï¼</view> |
| | | <view v-show="!item.arrowType">éè´æ¹æ¬¡ï¼</view> |
| | | <view v-show="!item.arrowType">è´¨éç¶æï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.partcode}}</view> |
| | | <view>{{item.partname}}</view> |
| | | <view class="ellipsis" style="width: 460rpx;"> |
| | | {{item.partspec?item.partspec:'/'}} |
| | | </view> |
| | | <view>{{item.ordercode}}</view> |
| | | <view style="height: 50rpx;display: flex;align-items: center;"> |
| | | <u-line-progress :percentage="(item.hqty/item.hplanqty)*100" |
| | | height="12" :showText='false'></u-line-progress> |
| | | <view style="margin-left: 6rpx; color:#2979FF"> |
| | | {{item.hqty}} |
| | | </view> |
| | | <view> |
| | | / |
| | | </view> |
| | | <view> |
| | | {{item.hplanqty}} PCS |
| | | </view> |
| | | </view> |
| | | <!-- <view>è¿åè¿æ²¡è¿å</view> --> |
| | | <view v-show="!item.arrowType">{{item.hqty}}</view> |
| | | <view v-show="!item.arrowType">{{item.customername}}</view> |
| | | <view v-show="!item.arrowType">/</view> |
| | | <view v-show="!item.arrowType"> |
| | | <view v-if="!item.qualitystatus">/</view> |
| | | <view v-else style="display: flex;align-items: center;"> |
| | | |
| | | <u-icon name="tags-fill" color="green" size="20" |
| | | v-if="item.qualitystatus==='CS'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='CS'">å
æ£</view> |
| | | |
| | | <u-icon name="checkmark-circle-fill" color="#55ff00" size="20" |
| | | v-if="item.qualitystatus==='OK'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='OK'">åæ ¼</view> |
| | | |
| | | <u-icon name="close-circle-fill" color="#FF0000" size="20" |
| | | v-if="item.qualitystatus==='NG'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='NG'">ä¸åæ ¼</view> |
| | | |
| | | <u-icon name="more-circle-fill" color="#55aaff" size="20" |
| | | v-if="item.qualitystatus==='TS'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='TS'">å¾
æ£</view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <u-radio size='20' class="marginRight20" :key="item.sbid" :name="item.sbid" |
| | | activeColor="red"></u-radio> |
| | | </view> |
| | | |
| | | |
| | | <view class="head_block" v-show="!item.arrowType"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | æ«æåºä½ |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20"> |
| | | <u-icon name="scan" @click="topScanClick" color="red" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_between marginBottom20 marginLeft20 marginTop20" |
| | | v-show="!item.arrowType"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>åºä½ä¿¡æ¯ï¼</view> |
| | | <view>æå±ä»åºï¼</view> |
| | | </view> |
| | | |
| | | <view class="flex_column contentFont" @click="sheetShow=true"> |
| | | <view v-if="item.lcationcode">{{item.lcationcode}}</view> |
| | | <view v-else style="color: #ccc;">ç¹å»éæ©ææ«åºä½ç </view> |
| | | <view v-if="item.stockcode">{{item.stockcode}}</view> |
| | | <view v-else style="color: #ccc;">ç¹å»éæ©ææ«åºä½ç </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view style="display: flex;justify-content: center;margin : 10rpx; 0"> |
| | | <view class="arrowClass" |
| | | @click="item.arrowType?arrowDownClick(item):arrowUpClick(item)"> |
| | | <u-icon :name="item.arrowType?'arrow-down':'arrow-up'" color="#c8c8c8" |
| | | size="25"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-gap height="10" v-if="index!==purchorderArr.length-1" bgColor="#eff0f1"></u-gap> |
| | | |
| | | |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view class="footer"> |
| | | <u-button size="large" :loading="isDisabledSubmitButton" :disabled="isDisabledSubmitButton" |
| | | loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" @click="submit" text="确认æäº¤"> |
| | | </u-button> |
| | | </view> |
| | | |
| | | |
| | | <u-picker :show="sheetShow" :columns="columns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='sheetShow=false' @change="changeHandler" @confirm='pickerConfirm' |
| | | @cancel='sheetShow=false'></u-picker> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | MesAppPurchInStorSelectCGOrderPart, |
| | | WarehouseLocationSearchStoreHouse, |
| | | MesAppPurchInStorSave, |
| | | WareHouseLocation |
| | | } from '../../config/api.js'; |
| | | |
| | | const App = getApp() |
| | | export default { |
| | | |
| | | onLoad(option) { |
| | | this.getMesAppPurchInStorSelectCGOrderPart(option.ordercode) |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | purchorderObj: {}, |
| | | purchorderArr: [], |
| | | radioValue: '', |
| | | sheetShow: false, //䏿å表æ¯å¦å±å¼ |
| | | sheetList: [], |
| | | columns: [], |
| | | columnsData: [], |
| | | wareHouseLocationArr: [], //ä»åºåºä½æ°ç» |
| | | isDisabledSubmitButton: false |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | this.getWareHouseLocation() |
| | | |
| | | |
| | | // this.getMesAppPurchInStorSelectCGOrderPart('PO-2025-01-0002') |
| | | // this.getWarehouseLocationSearchStoreHouse('0011') |
| | | }, |
| | | methods: { |
| | | async getWareHouseLocation() { |
| | | const { |
| | | data: res |
| | | } = await WareHouseLocation() |
| | | this.wareHouseLocationArr = res.filter(i => i.children.length > 0) |
| | | this.columns = [ |
| | | this.wareHouseLocationArr.map(i => i.text), |
| | | this.wareHouseLocationArr[0].children.map(i => i.text) |
| | | ] |
| | | this.wareHouseLocationArr.forEach(i => { |
| | | this.columnsData.push(i.children.map(j => j.text)) |
| | | }) |
| | | |
| | | }, |
| | | changeHandler(e) { |
| | | const { |
| | | columnIndex, |
| | | value, |
| | | values, // values为å½ååååçæ°ç»å
容 |
| | | index, |
| | | // 微信å°ç¨åºæ æ³å°pickerå®ä¾ä¼ åºæ¥ï¼åªè½éè¿refæä½ |
| | | picker = this.$refs.uPicker |
| | | } = e |
| | | // å½ç¬¬ä¸åå¼åçååæ¶ï¼åå第äºå(åä¸å)对åºçé项 |
| | | if (columnIndex === 0) { |
| | | // pickerä¸ºéæ©å¨thiså®ä¾ï¼åå第äºå对åºçé项 |
| | | picker.setColumnValues(1, this.columnsData[index]) |
| | | } |
| | | }, |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | // æ«æ |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // scanType: ['barCode', 'qrCode'], |
| | | scanType: ['qrCode'], |
| | | success: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.scanContent = res.result; |
| | | that.getWarehouseLocationSearchStoreHouse(that.scanContent) |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | async getWarehouseLocationSearchStoreHouse(locationcode) { |
| | | const data = { |
| | | locationcode |
| | | } |
| | | const res = await WarehouseLocationSearchStoreHouse(data) |
| | | if (res.code === '200') { |
| | | this.purchorderObj.lcationcode = res.data[0].locationname |
| | | this.purchorderObj.stockcode = res.data[0].warehousename |
| | | |
| | | this.purchorderObj.lcationname2 = res.data[0].locationcode |
| | | this.purchorderObj.stockname2 = res.data[0].warehousecode |
| | | } else { |
| | | this.$u.toast(res.message) |
| | | } |
| | | }, |
| | | // è·åæ ç¾ä¿¡æ¯ |
| | | async getMesAppPurchInStorSelectCGOrderPart(ordercode) { |
| | | const data = { |
| | | ordercode |
| | | } |
| | | const res = await MesAppPurchInStorSelectCGOrderPart(this.global.formatData(data)) |
| | | if (res.code === '200') { |
| | | res.data.forEach((i, ind) => { |
| | | i.arrowType = ind !== 0 |
| | | i.lcationcode = '' //åºä½ |
| | | i.stockcode = '' //ä»åº |
| | | }) |
| | | this.purchorderArr = res.data |
| | | this.purchorderObj = this.purchorderArr[0] |
| | | this.radioValue = this.purchorderObj.sbid |
| | | } |
| | | }, |
| | | // picker确认æé® |
| | | pickerConfirm(val) { |
| | | |
| | | this.purchorderObj.lcationcode = val.value[1] |
| | | this.purchorderObj.stockcode = val.value[0] |
| | | |
| | | this.purchorderObj.stockname2 = this.wareHouseLocationArr.find(i => i.text === this.purchorderObj |
| | | .stockcode).value |
| | | |
| | | this.purchorderObj.lcationname2 = this.wareHouseLocationArr.find(i => i.value === this.purchorderObj |
| | | .stockname2).children.find(i => i.text === this.purchorderObj |
| | | .lcationcode).value |
| | | |
| | | |
| | | this.sheetShow = false |
| | | }, |
| | | // åéæé®ç¹å»äºä»¶ |
| | | radioValueClick(val) { |
| | | this.radioValue = val |
| | | this.purchorderObj = this.purchorderArr.find(i => i.sbid === val) |
| | | }, |
| | | // å é¤äºä»¶ç¹å» |
| | | trashClick(val) { |
| | | this.purchorderArr.splice(val, 1) |
| | | this.purchorderObj = this.purchorderArr[0] |
| | | this.radioValue = this.purchorderObj.sbid |
| | | }, |
| | | // ç®å¤´ç±åä¸å为å䏿¶è§¦å |
| | | arrowDownClick(val) { |
| | | this.purchorderArr.forEach(i => { |
| | | i.arrowType = i.sbid !== val.sbid |
| | | }) |
| | | this.$forceUpdate() |
| | | }, |
| | | // ç®å¤´ç±åä¸å为å䏿¶è§¦å |
| | | arrowUpClick(val) { |
| | | val.arrowType = true |
| | | this.$forceUpdate() |
| | | }, |
| | | async submit() { |
| | | const data1 = { |
| | | username: uni.getStorageSync("username") |
| | | } |
| | | let data2 = [] |
| | | |
| | | let ind = this.purchorderArr.findIndex(i => i.lcationcode === '') |
| | | if (ind > -1) { //è¯´æææªå¡«åçåºä½ä¿¡æ¯ |
| | | return this.$u.toast('第' + (ind + 1) + '个çåºä½ä¿¡æ¯æªå¡«å') |
| | | } |
| | | console.log(this.wareHouseLocationArr.flat()) |
| | | |
| | | this.purchorderArr.forEach(i => { |
| | | data2.push({ |
| | | "hbarcode": "", |
| | | "hbillno": "", |
| | | "hqty": i.hqty, |
| | | "hcustomercode": i.customercode, |
| | | "hdeptcode": i.departmentcode, |
| | | "partcode": i.partcode, |
| | | "unitcode": i.unitcode, |
| | | "hsourceid": i.orderid, |
| | | "hsourcebillno": i.ordercode, |
| | | |
| | | "stockcode": this.purchorderObj.stockname2, |
| | | "lcationcode": this.purchorderObj.lcationname2 |
| | | }) |
| | | }) |
| | | |
| | | // console.log(JSON.stringify(data2)) |
| | | |
| | | const res = await MesAppPurchInStorSave(this.global.formatData( |
| | | data1), data2) |
| | | |
| | | if (res.code === '200') { |
| | | let prevPage = getCurrentPages()[getCurrentPages() |
| | | .length - |
| | | 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | prevPage.$vm |
| | | .getMesAppPurchOrderSearch() // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | } else { |
| | | this.$u.toast(res.message) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | |
| | | |
| | | .orderNumber { |
| | | width: 60rpx; |
| | | height: 40rpx; |
| | | // margin: -22rpx 0 0 -30rpx; |
| | | background-color: #d3daf9; |
| | | color: #2979FF; |
| | | font-size: 26rpx; |
| | | padding: 4rpx 0 0 10rpx; |
| | | border-radius: 0 0 90% 0; |
| | | } |
| | | |
| | | .trash { |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | margin: -26rpx 0 0 646rpx; |
| | | background-color: #d3daf9; |
| | | font-size: 26rpx; |
| | | padding: 6rpx 0 0 10rpx; |
| | | border-radius: 100%; |
| | | } |
| | | |
| | | .custominputClass { |
| | | width: 424rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: 3rpx #eff0f1 solid; |
| | | border-radius: 10rpx; |
| | | padding: 0 10rpx; |
| | | } |
| | | |
| | | .arrowClass { |
| | | display: flex; |
| | | justify-content: center; |
| | | // background-color: #efefef; |
| | | width: 100rpx; |
| | | // border-radius: 10rpx; |
| | | height: 56rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="éè´å
¥åº4"></page-nav> |
| | | |
| | | <view v-if='purchorderArr.length!==0' class="mainContent" style=""> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <!-- max-height: 1340rpx;overflow: auto; --> |
| | | <view style=""> |
| | | |
| | | <view class="head" style="position: relative;"> |
| | | |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class=" flex_column" style="width: 100%;" @click="radioValueClick(item.sbid)" |
| | | v-for="(item,index) in purchorderArr" :key="item.sbid"> |
| | | |
| | | <view class="head_block" style="position: absolute;margin: 38rpx 0 0 0;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | ç©æä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="orderNumber" :key="item.sbid"> |
| | | {{(index+1).toString().padStart(2,0)}} |
| | | </view> |
| | | |
| | | <view class="trash" v-show="purchorderArr.length>1" @click="trashClick(index)"> |
| | | <u-icon name="trash" size='20'></u-icon> |
| | | </view> |
| | | |
| | | <view v-show="purchorderArr.length===1" style="width: 48rpx;height: 48rpx;"> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="flex_between marginBottom20 marginLeft20 marginTop20"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>ç©æç¼ç ï¼</view> |
| | | <view>ç©æåç§°ï¼</view> |
| | | <view>ç©æè§æ ¼ï¼</view> |
| | | <view>éè´è®¢åï¼</view> |
| | | <view>å°è´§è¿åº¦ï¼</view> |
| | | <!-- <view>ç©ææ ç¾ï¼</view> --> |
| | | <view v-show="!item.arrowType">ç©ææ°éï¼</view> |
| | | <view v-show="!item.arrowType">便¹ä¿¡æ¯ï¼</view> |
| | | <view v-show="!item.arrowType">éè´æ¹æ¬¡ï¼</view> |
| | | <view v-show="!item.arrowType">è´¨éç¶æï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.partcode}}</view> |
| | | <view>{{item.partname}}</view> |
| | | <view class="ellipsis" style="width: 460rpx;"> |
| | | {{item.partspec?item.partspec:'/'}} |
| | | </view> |
| | | <view>{{item.ordercode}}</view> |
| | | <view style="height: 50rpx;display: flex;align-items: center;"> |
| | | <u-line-progress :percentage="(item.hqty/item.hplanqty)*100" |
| | | height="12" :showText='false'></u-line-progress> |
| | | <view style="margin-left: 6rpx; color:#2979FF"> |
| | | {{item.hqty}} |
| | | </view> |
| | | <view> |
| | | / |
| | | </view> |
| | | <view> |
| | | {{item.hplanqty}} PCS |
| | | </view> |
| | | </view> |
| | | <!-- <view>è¿åè¿æ²¡è¿å</view> --> |
| | | <view v-show="!item.arrowType">{{item.hqty}}</view> |
| | | <view v-show="!item.arrowType">{{item.customername}}</view> |
| | | <view v-show="!item.arrowType">/</view> |
| | | <view v-show="!item.arrowType"> |
| | | <view v-if="!item.qualitystatus">/</view> |
| | | <view v-else style="display: flex;align-items: center;"> |
| | | |
| | | <u-icon name="tags-fill" color="green" size="20" |
| | | v-if="item.qualitystatus==='CS'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='CS'">å
æ£</view> |
| | | |
| | | <u-icon name="checkmark-circle-fill" color="#55ff00" size="20" |
| | | v-if="item.qualitystatus==='OK'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='OK'">åæ ¼</view> |
| | | |
| | | <u-icon name="close-circle-fill" color="#FF0000" size="20" |
| | | v-if="item.qualitystatus==='NG'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='NG'">ä¸åæ ¼</view> |
| | | |
| | | <u-icon name="more-circle-fill" color="#55aaff" size="20" |
| | | v-if="item.qualitystatus==='TS'"></u-icon> |
| | | <view style="margin-left: 10rpx;" |
| | | v-if="item.qualitystatus==='TS'">å¾
æ£</view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <u-radio size='20' class="marginRight20" :key="item.sbid" :name="item.sbid" |
| | | activeColor="red"></u-radio> |
| | | </view> |
| | | |
| | | |
| | | <view class="head_block" v-show="!item.arrowType"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | æ«æåºä½ |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20"> |
| | | <u-icon name="scan" @click="topScanClick" color="red" size="28"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="flex_between marginBottom20 marginLeft20 marginTop20" |
| | | v-show="!item.arrowType"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>åºä½ä¿¡æ¯ï¼</view> |
| | | <view>æå±ä»åºï¼</view> |
| | | </view> |
| | | |
| | | <view class="flex_column contentFont" @click="sheetShow=true"> |
| | | <view v-if="item.lcationcode">{{item.lcationcode}}</view> |
| | | <view v-else style="color: #ccc;">ç¹å»éæ©ææ«åºä½ç </view> |
| | | <view v-if="item.stockcode">{{item.stockcode}}</view> |
| | | <view v-else style="color: #ccc;">ç¹å»éæ©ææ«åºä½ç </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view style="display: flex;justify-content: center;margin : 10rpx; 0"> |
| | | <view class="arrowClass" |
| | | @click="item.arrowType?arrowDownClick(item):arrowUpClick(item)"> |
| | | <u-icon :name="item.arrowType?'arrow-down':'arrow-up'" color="#c8c8c8" |
| | | size="25"></u-icon> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-gap height="10" v-if="index!==purchorderArr.length-1" bgColor="#eff0f1"></u-gap> |
| | | |
| | | |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view class="footer"> |
| | | <u-button size="large" :loading="isDisabledSubmitButton" :disabled="isDisabledSubmitButton" |
| | | loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" @click="submit" text="确认æäº¤"> |
| | | </u-button> |
| | | </view> |
| | | |
| | | |
| | | <u-picker :show="sheetShow" :columns="columns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='sheetShow=false' @change="changeHandler" @confirm='pickerConfirm' |
| | | @cancel='sheetShow=false'></u-picker> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | MesAppPurchInStorSelectCGOrderPart, |
| | | WarehouseLocationSearchStoreHouse, |
| | | MesAppPurchInStorSave, |
| | | WareHouseLocation |
| | | } from '../../config/api.js'; |
| | | |
| | | const App = getApp() |
| | | export default { |
| | | |
| | | onLoad(option) { |
| | | this.getMesAppPurchInStorSelectCGOrderPart(option.ordercode) |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | purchorderObj: {}, |
| | | purchorderArr: [], |
| | | radioValue: '', |
| | | sheetShow: false, //䏿å表æ¯å¦å±å¼ |
| | | sheetList: [], |
| | | columns: [], |
| | | columnsData: [], |
| | | wareHouseLocationArr: [], //ä»åºåºä½æ°ç» |
| | | isDisabledSubmitButton: false |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | this.getWareHouseLocation() |
| | | |
| | | |
| | | // this.getMesAppPurchInStorSelectCGOrderPart('PO-2025-01-0002') |
| | | // this.getWarehouseLocationSearchStoreHouse('0011') |
| | | }, |
| | | methods: { |
| | | async getWareHouseLocation() { |
| | | const { |
| | | data: res |
| | | } = await WareHouseLocation() |
| | | this.wareHouseLocationArr = res.filter(i => i.children.length > 0) |
| | | this.columns = [ |
| | | this.wareHouseLocationArr.map(i => i.text), |
| | | this.wareHouseLocationArr[0].children.map(i => i.text) |
| | | ] |
| | | this.wareHouseLocationArr.forEach(i => { |
| | | this.columnsData.push(i.children.map(j => j.text)) |
| | | }) |
| | | |
| | | }, |
| | | changeHandler(e) { |
| | | const { |
| | | columnIndex, |
| | | value, |
| | | values, // values为å½ååååçæ°ç»å
容 |
| | | index, |
| | | // 微信å°ç¨åºæ æ³å°pickerå®ä¾ä¼ åºæ¥ï¼åªè½éè¿refæä½ |
| | | picker = this.$refs.uPicker |
| | | } = e |
| | | // å½ç¬¬ä¸åå¼åçååæ¶ï¼åå第äºå(åä¸å)对åºçé项 |
| | | if (columnIndex === 0) { |
| | | // pickerä¸ºéæ©å¨thiså®ä¾ï¼åå第äºå对åºçé项 |
| | | picker.setColumnValues(1, this.columnsData[index]) |
| | | } |
| | | }, |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | // æ«æ |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // scanType: ['barCode', 'qrCode'], |
| | | scanType: ['qrCode'], |
| | | success: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.scanContent = res.result; |
| | | that.getWarehouseLocationSearchStoreHouse(that.scanContent) |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | async getWarehouseLocationSearchStoreHouse(locationcode) { |
| | | const data = { |
| | | locationcode |
| | | } |
| | | const res = await WarehouseLocationSearchStoreHouse(data) |
| | | if (res.code === '200') { |
| | | this.purchorderObj.lcationcode = res.data[0].locationname |
| | | this.purchorderObj.stockcode = res.data[0].warehousename |
| | | |
| | | this.purchorderObj.lcationname2 = res.data[0].locationcode |
| | | this.purchorderObj.stockname2 = res.data[0].warehousecode |
| | | } else { |
| | | this.$u.toast(res.message) |
| | | } |
| | | }, |
| | | // è·åæ ç¾ä¿¡æ¯ |
| | | async getMesAppPurchInStorSelectCGOrderPart(ordercode) { |
| | | const data = { |
| | | ordercode |
| | | } |
| | | const res = await MesAppPurchInStorSelectCGOrderPart(this.global.formatData(data)) |
| | | if (res.code === '200') { |
| | | res.data.forEach((i, ind) => { |
| | | i.arrowType = ind !== 0 |
| | | i.lcationcode = '' //åºä½ |
| | | i.stockcode = '' //ä»åº |
| | | }) |
| | | this.purchorderArr = res.data |
| | | this.purchorderObj = this.purchorderArr[0] |
| | | this.radioValue = this.purchorderObj.sbid |
| | | } |
| | | }, |
| | | // picker确认æé® |
| | | pickerConfirm(val) { |
| | | |
| | | this.purchorderObj.lcationcode = val.value[1] |
| | | this.purchorderObj.stockcode = val.value[0] |
| | | |
| | | this.purchorderObj.stockname2 = this.wareHouseLocationArr.find(i => i.text === this.purchorderObj |
| | | .stockcode).value |
| | | |
| | | this.purchorderObj.lcationname2 = this.wareHouseLocationArr.find(i => i.value === this.purchorderObj |
| | | .stockname2).children.find(i => i.text === this.purchorderObj |
| | | .lcationcode).value |
| | | |
| | | |
| | | this.sheetShow = false |
| | | }, |
| | | // åéæé®ç¹å»äºä»¶ |
| | | radioValueClick(val) { |
| | | this.radioValue = val |
| | | this.purchorderObj = this.purchorderArr.find(i => i.sbid === val) |
| | | }, |
| | | // å é¤äºä»¶ç¹å» |
| | | trashClick(val) { |
| | | this.purchorderArr.splice(val, 1) |
| | | this.purchorderObj = this.purchorderArr[0] |
| | | this.radioValue = this.purchorderObj.sbid |
| | | }, |
| | | // ç®å¤´ç±åä¸å为å䏿¶è§¦å |
| | | arrowDownClick(val) { |
| | | this.purchorderArr.forEach(i => { |
| | | i.arrowType = i.sbid !== val.sbid |
| | | }) |
| | | this.$forceUpdate() |
| | | }, |
| | | // ç®å¤´ç±åä¸å为å䏿¶è§¦å |
| | | arrowUpClick(val) { |
| | | val.arrowType = true |
| | | this.$forceUpdate() |
| | | }, |
| | | async submit() { |
| | | const data1 = { |
| | | username: uni.getStorageSync("username") |
| | | } |
| | | let data2 = [] |
| | | |
| | | let ind = this.purchorderArr.findIndex(i => i.lcationcode === '') |
| | | if (ind > -1) { //è¯´æææªå¡«åçåºä½ä¿¡æ¯ |
| | | return this.$u.toast('第' + (ind + 1) + '个çåºä½ä¿¡æ¯æªå¡«å') |
| | | } |
| | | console.log(this.wareHouseLocationArr.flat()) |
| | | |
| | | this.purchorderArr.forEach(i => { |
| | | data2.push({ |
| | | "hbarcode": "", |
| | | "hbillno": "", |
| | | "hqty": i.hqty, |
| | | "hcustomercode": i.customercode, |
| | | "hdeptcode": i.departmentcode, |
| | | "partcode": i.partcode, |
| | | "unitcode": i.unitcode, |
| | | "hsourceid": i.orderid, |
| | | "hsourcebillno": i.ordercode, |
| | | |
| | | "stockcode": this.purchorderObj.stockname2, |
| | | "lcationcode": this.purchorderObj.lcationname2 |
| | | }) |
| | | }) |
| | | |
| | | // console.log(JSON.stringify(data2)) |
| | | |
| | | const res = await MesAppPurchInStorSave(this.global.formatData( |
| | | data1), data2) |
| | | |
| | | if (res.code === '200') { |
| | | let prevPage = getCurrentPages()[getCurrentPages() |
| | | .length - |
| | | 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | prevPage.$vm |
| | | .getMesAppPurchOrderSearch() // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | } else { |
| | | this.$u.toast(res.message) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | |
| | | |
| | | .orderNumber { |
| | | width: 60rpx; |
| | | height: 40rpx; |
| | | // margin: -22rpx 0 0 -30rpx; |
| | | background-color: #d3daf9; |
| | | color: #2979FF; |
| | | font-size: 26rpx; |
| | | padding: 4rpx 0 0 10rpx; |
| | | border-radius: 0 0 90% 0; |
| | | } |
| | | |
| | | .trash { |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | margin: -26rpx 0 0 646rpx; |
| | | background-color: #d3daf9; |
| | | font-size: 26rpx; |
| | | padding: 6rpx 0 0 10rpx; |
| | | border-radius: 100%; |
| | | } |
| | | |
| | | .custominputClass { |
| | | width: 424rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: 3rpx #eff0f1 solid; |
| | | border-radius: 10rpx; |
| | | padding: 0 10rpx; |
| | | } |
| | | |
| | | .arrowClass { |
| | | display: flex; |
| | | justify-content: center; |
| | | // background-color: #efefef; |
| | | width: 100rpx; |
| | | // border-radius: 10rpx; |
| | | height: 56rpx; |
| | | } |
| | | </style> |
| | |
| | | <!-- <scan-code></scan-code> --> |
| | | |
| | | <!-- æ¬æµ®ç --> |
| | | <view v-show="purchorderArr.length!==0&&!sheetShow" @click="topScanClick"> |
| | | <!-- <view v-show="purchorderArr.length!==0&&!sheetShow" @click="topScanClick"> |
| | | <drag-ball :x='$DeviceInformation.screenWidth*0.8' :y="$DeviceInformation.screenHeight*0.7"></drag-ball> |
| | | </view> |
| | | </view> --> |
| | | |
| | | |
| | | |