| | |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="qrCodeDisplay"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID:</view> |
| | |
| | | </view> |
| | | <view class="detail" v-if="item.辅助属性"> |
| | | <text>辅助属性:</text>{{item.辅助属性}} |
| | | </view> |
| | | <view class="detail" v-if="item.款号"> |
| | | <text>款号:</text>{{item.款号}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | </view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | |
| | | getUserStockRelation |
| | | } from "@/utils/userRelationManager.js" |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | export default { |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | HSourceBillNoFocus: false, |
| | |
| | | HPageTitle: '采购入库单', |
| | | |
| | | |
| | | materMeta: [ |
| | | |
| | | ], |
| | | |
| | | showHStockPlaceName: false, |
| | | showHMainSourceBillType: true, |
| | | showHSourceBillNo: true, |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | BillListPopupVue |
| | | BillListPopupVue, BarCodePopupVue |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async qrCodeDisplay() { |
| | | try { |
| | | this.$refs.barcodePopup.setCodeInfo(this.hform.HBillNo) |
| | | await this.$nextTick() |
| | | this.$refs.barcodePopup.open() |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: err |
| | | }) |
| | | } |
| | | }, |
| | | async getRelationStore() { |
| | | let { |
| | | data, |
| | |
| | | } else { |
| | | inputVal = this.hform.HSourceBillNo |
| | | } |
| | | |
| | | |
| | | console.log('inputVal: ',inputVal); |
| | | if (inputVal == '') { |
| | | CommonUtils.playSound(0) |
| | | this.refreshHSourceBillState() |
| | |
| | | this.showHSupName = false |
| | | this.tabs = 2 |
| | | } else { //物料条码 |
| | | this.materMeta.push(data) |
| | | this.tabs = 2 |
| | | if (!this.hform.HSourceBillNo) { |
| | | this.hform.HSupName = data.hSupNameField |
| | |
| | | } |
| | | //供应商不可编辑 |
| | | this.showHSupName = false |
| | | //光标对准物料 |
| | | this.barCodeFocus = true; |
| | | } |
| | | } |
| | | //显示表体明细 |
| | |
| | | console.log('物料', res.data) |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data |
| | | this.materMeta = data.BarCodeDetailslist |
| | | this.Materlist = data.Materlist |
| | | if (!data.BarCodeDetailslist[0].HBarCode) { |
| | | this.hform.HMaterName_B = '' |
| | |
| | | this.hform.HWHName_B = '' |
| | | this.hform.HSPName_B = '' |
| | | } else { |
| | | this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode |
| | | this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName |
| | | this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel |
| | | this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo |
| | |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/set_SavePOStockInBill_Json', |
| | | method: 'POST', |
| | | dataType: "json", |
| | | dataType: "json", |
| | | timeout: 10000, |
| | | data: { |
| | | oMain: sMainStr |
| | | }, |
| | | success: (res) => { |
| | | success: async (res) => { |
| | | console.log(1, res); |
| | | uni.hideLoading() |
| | | if (res.data.count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/caigouruku/form?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | let sMain = JSON.stringify(this.materMeta) + ';' + this.hform.HBillType + ';' + this.hform.HSourceBillNo |
| | | try { |
| | | // 为条码设置出库单号和出库次数 |
| | | // await this.Set_BarCodeBill(sMain) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/caigouruku/form?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 50) |
| | | } |
| | | } |
| | | }); |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | title: err, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | | }, |
| | | |
| | | Set_BarCodeBill(sMain) { |
| | | return new Promise((resolve, reject) => { |
| | | CommonUtils.doRequest2({ |
| | | method: 'POST', |
| | | url: 'Sc_BarCode/Set_BarCodeBill', |
| | | data: { |
| | | msg: sMain |
| | | }, |
| | | resFunction: (res) => { |
| | | let {data, count, Message} = res.data |
| | | if(count == 1) { |
| | | resolve() |
| | | }else { |
| | | reject(Message) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.showModal({ |
| | | title: '提示', |
| | |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | width: inherit; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |