| | |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName" |
| | | placeholder="不可操作" /></view> |
| | | placeholder="不可操作" disabled="" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | @change="HMainSourceBillTypeChange"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | </picker> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | <view class="righton" v-show="!showHMainSourceBillType"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单单号:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <!-- <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox :isFocus="HSourceBillNoFocus" ref="uniComboxSourceBill" |
| | | :confirm-call="onSourceBillBlurHandler" v-if="reHSourceBillNo" |
| | | :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" v-model="hform.HSourceBillNo" |
| | | @input="HSourceBillNoChange"></uni-combox> |
| | | </view> |
| | | </view> --> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input :focus="HSourceBillNoFocus" @confirm="onHSourceBillNoConfirmHandler" type="text" |
| | | name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | | <uni-icons type="search" size="20" @click="showBillList"></uni-icons> |
| | | </view> |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | </view> |
| | |
| | | <view class="right"> |
| | | <picker mode="date" v-model="hform.HDate" @change="HDateChange"> |
| | | <input disabled v-model="hform.HDate" placeholder="请选择日期" /> |
| | | </picker> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">供应商:</view> |
| | | <view class="right" v-show="showHSupName"> |
| | | <!-- <view class="right" v-show="showHSupName"> |
| | | <uni-combox :candidates="arrayHSupName" placeholder="请选择供应商" v-model="hform.HSupName" |
| | | @input="HSupNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHSupName"> |
| | | </view> --> |
| | | <view class="righton"> |
| | | <input name="HSupName" disabled v-model="hform.HSupName" placeholder="请选择供应商" /> |
| | | </view> |
| | | </view> |
| | |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | import { getUserStockRelation } from '../../utils/userRelationManager'; |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | export default { |
| | | components: {BillListPopupVue}, |
| | | data() { |
| | | return { |
| | | HSourceBillNoFocus: false, |
| | |
| | | OperationType: 1, |
| | | HInterID_Temp: '', |
| | | |
| | | showHStockPlaceName: true, |
| | | showHStockPlaceName: false, |
| | | showHMainSourceBillType: true, |
| | | showHSourceBillNo: true, |
| | | reHSourceBillNo: true, |
| | |
| | | this.getNewData() |
| | | this.HSourceBillNoFocus = true |
| | | } |
| | | this.getHBaseList() |
| | | this.getHSupList() |
| | | this.getRelationStore() |
| | | // this.getHBaseList() |
| | | // this.getHSupList() |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | | |
| | | uni.$on('BillSelectComplete', (e) => { |
| | | console.log("接收到的消息: ", e.HBillNo) |
| | | this.getHBarCodeData(e.HBillNo) |
| | | this.$refs.billList.exit() |
| | | }) |
| | | }, |
| | | beforeDestroy() { |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async getRelationStore() { |
| | | let { |
| | | data, |
| | | count |
| | | } = await getUserStockRelation() |
| | | if (count == 1) { |
| | | let WHIDList = [] |
| | | |
| | | Array.from(data).forEach(elem => { |
| | | WHIDList.push(elem.HItemID) |
| | | }) |
| | | |
| | | let sWhere = ` and HItemID in (${WHIDList.join(",")})` |
| | | this.getHBaseList({ |
| | | sWhere: sWhere |
| | | }) |
| | | |
| | | } else { |
| | | this.getHBaseList() |
| | | } |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | | }, |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | |
| | | this.hform.HDate = e.detail.value |
| | | }, |
| | | //基础仓库资料 |
| | | getHBaseList() { |
| | | getHBaseList({sWhere=""} = {}) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_Warehouse/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: sWhere, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | |
| | | }, |
| | | }); |
| | | |
| | | this.getHYDList() |
| | | // this.getHYDList() |
| | | }, |
| | | //源单资料 |
| | | getHYDList() { |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value] |
| | | if (this.HMainSourceBillType == '退料通知单') { |
| | | this.hform.HMainSourceBillType = 1105 |
| | | this.getHYDList() |
| | | // this.getHYDList() |
| | | } else if (this.HMainSourceBillType == '采购订单') { |
| | | this.hform.HMainSourceBillType = 1102 |
| | | this.getHYDList() |
| | | // this.getHYDList() |
| | | } else { |
| | | this.hform.HMainSourceBillType = -1 |
| | | this.getHYDList() |
| | | // this.getHYDList() |
| | | } |
| | | }, |
| | | |
| | |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 6rpx 0; |
| | | gap: 12rpx; |
| | | |
| | | .title { |
| | | width: 208rpx; |
| | | width: 200rpx; |
| | | |
| | | text { |
| | | color: red; |
| | |
| | | } |
| | | |
| | | .right { |
| | | width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | position: relative; |
| | | display: flex; |
| | | |
| | | .uni-combox { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .righton { |
| | | width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .icon-wrapper { |
| | | background-color: #3A78FF; |
| | | width: 52rpx; |
| | | height: 52rpx; |
| | | border-radius: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .uni-icons { |
| | | color: #fff !important; |
| | | } |
| | | } |
| | | |
| | | .icon-wrapper[disabled] { |
| | | background-color: rgba(228, 228, 228, 1); |
| | | pointer-events: none; |
| | | touch-action: none; |
| | | } |
| | | |
| | | </style> |