添加 通用条码生成页面 模块
添加 扫描物料编码获取发货通知单并输入数量进行出库 模块
| | |
| | | "style": { |
| | | "navigationBarTitleText": "条码生成" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/saomachuku/table", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "扫码出库", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | } |
| | | ], |
| | | "tabBar": { |
| | |
| | | menuListName: 'index', |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | itemData: [ |
| | | // { |
| | | // img: '../../static/icon/icon8.png', |
| | | // text: '条码管理-收料通知单', |
| | | // url: '/pages/tiaomaguanli/table?HBillType=1103', |
| | | // id: 1, |
| | | // hidden: false, |
| | | // }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '采购订单标签', |
| | | url: '/pages/caigoudingdan/caigoudingdan', |
| | | id: 1, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon4.png', |
| | | text: '采购订单子标签', |
| | | url: '/pages/tiaomadaying/tiaomadaying', |
| | | id: 2, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon11.png', |
| | | text: '收料通知单标签', |
| | | url: '/pages/shouliaotongzhi/table', |
| | | id: 3, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '采购入库新增', |
| | | url: '/pages/caigouruku/form?OperationType=1', |
| | | id: 4, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon20.png', |
| | | text: '采购退料新增', |
| | | url: '/pages/caigoutuiliao/form?OperationType=1', |
| | | id: 5, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '直接调拨新增', |
| | | url: '/pages/zhijiediaobo/form?OperationType=1', |
| | | id: 6, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料新增', |
| | | url: '/pages/shengchanlingliaoshengdan/form?OperationType=1', |
| | | id: 7, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料新增', |
| | | url: '/pages/shengchanbuliao/form?OperationType=1', |
| | | id: 8, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库新增', |
| | | url: '/pages/shengchanrukushengdan/form?OperationType=1', |
| | | id: 9, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料新增', |
| | | url: '/pages/weiwailingliao/form?OperationType=1', |
| | | id: 10, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '其他入库新增', |
| | | url: '/pages/qitaruku_v2/form?OperationType=1', |
| | | id: 11, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库新增', |
| | | url: '/pages/qitachuku_v2/form?OperationType=1', |
| | | id: 12, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库新增', |
| | | url: '/pages/xiaoshouchuku/form?OperationType=1', |
| | | id: 13, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon19.png', |
| | | text: '销售退货新增', |
| | | url: '/pages/xiaoshoutuihuo/form?OperationType=1', |
| | | id: 14, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon19.png', |
| | | text: '委外入库新增', |
| | | url: '/pages/weiwairuku/form?OperationType=1', |
| | | id: 15, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料检验', |
| | | url: '/pages/shengchanlingliao/form?OperationType=1', |
| | | id: 16, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料校验', |
| | | url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1', |
| | | id: 17, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '生产调拨校验', |
| | | url: '/pages/shengchandiaobo/form?OperationType=1', |
| | | id: 18, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库校验', |
| | | url: '/pages/qitachukujiaoyan/detail?OperationType=1', |
| | | id: 19, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库校验', |
| | | url: '/pages/shengchanruku/form?OperationType=1', |
| | | id: 20, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库校验', |
| | | url: '/pages/xiaoshouchukujiaoyan/form?OperationType=1', |
| | | id: 21, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料校验', |
| | | url: '/pages/weiwailingliaojiaoyan/form?OperationType=1', |
| | | id: 22, |
| | | hidden: false, |
| | | }], |
| | | itemData: [{ |
| | | img: '../../static/icon/icon8.png', |
| | | text: '条码管理-收料通知单', |
| | | url: '/pages/tiaomaguanli/table?HBillType=1103', |
| | | id: 1, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '扫码出库', |
| | | url: '/pages/saomachuku/table', |
| | | id: 1, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '采购订单标签', |
| | | url: '/pages/caigoudingdan/caigoudingdan', |
| | | id: 1, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon4.png', |
| | | text: '采购订单子标签', |
| | | url: '/pages/tiaomadaying/tiaomadaying', |
| | | id: 2, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon11.png', |
| | | text: '收料通知单标签', |
| | | url: '/pages/shouliaotongzhi/table', |
| | | id: 3, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '采购入库新增', |
| | | url: '/pages/caigouruku/form?OperationType=1', |
| | | id: 4, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon20.png', |
| | | text: '采购退料新增', |
| | | url: '/pages/caigoutuiliao/form?OperationType=1', |
| | | id: 5, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '直接调拨新增', |
| | | url: '/pages/zhijiediaobo/form?OperationType=1', |
| | | id: 6, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料新增', |
| | | url: '/pages/shengchanlingliaoshengdan/form?OperationType=1', |
| | | id: 7, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料新增', |
| | | url: '/pages/shengchanbuliao/form?OperationType=1', |
| | | id: 8, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库新增', |
| | | url: '/pages/shengchanrukushengdan/form?OperationType=1', |
| | | id: 9, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料新增', |
| | | url: '/pages/weiwailingliao/form?OperationType=1', |
| | | id: 10, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '其他入库新增', |
| | | url: '/pages/qitaruku_v2/form?OperationType=1', |
| | | id: 11, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库新增', |
| | | url: '/pages/qitachuku_v2/form?OperationType=1', |
| | | id: 12, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库新增', |
| | | url: '/pages/xiaoshouchuku/form?OperationType=1', |
| | | id: 13, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon19.png', |
| | | text: '销售退货新增', |
| | | url: '/pages/xiaoshoutuihuo/form?OperationType=1', |
| | | id: 14, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon19.png', |
| | | text: '委外入库新增', |
| | | url: '/pages/weiwairuku/form?OperationType=1', |
| | | id: 15, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '生产领料检验', |
| | | url: '/pages/shengchanlingliao/form?OperationType=1', |
| | | id: 16, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon31.png', |
| | | text: '生产补料校验', |
| | | url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1', |
| | | id: 17, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '生产调拨校验', |
| | | url: '/pages/shengchandiaobo/form?OperationType=1', |
| | | id: 18, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '其他出库校验', |
| | | url: '/pages/qitachukujiaoyan/detail?OperationType=1', |
| | | id: 19, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon17.png', |
| | | text: '生产入库校验', |
| | | url: '/pages/shengchanruku/form?OperationType=1', |
| | | id: 20, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon18.png', |
| | | text: '销售出库校验', |
| | | url: '/pages/xiaoshouchukujiaoyan/form?OperationType=1', |
| | | id: 21, |
| | | hidden: false, |
| | | }, { |
| | | img: '../../static/icon/icon30.png', |
| | | text: '委外领料校验', |
| | | url: '/pages/weiwailingliaojiaoyan/form?OperationType=1', |
| | | id: 22, |
| | | hidden: false, |
| | | } |
| | | ], |
| | | // itemData: [{ |
| | | // img: '../../static/icon/icon1.png', |
| | | // text: '设备档案', |
| New file |
| | |
| | | <template> |
| | | <view class="page" id="pageContent"> |
| | | <view class="search-condition-zone"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 条码: |
| | | </view> |
| | | <view class="right general"> |
| | | <input type="text" v-model="HBarCode" @confirm="getCode(HBarCode)" /> |
| | | </view> |
| | | <view> |
| | | <uni-icons type="scan" |
| | | style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" |
| | | size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 发货通知单: |
| | | </view> |
| | | <view class="right general"> |
| | | <input type="text" v-model="HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 客户: |
| | | </view> |
| | | <view class="right general"> |
| | | <input type="text" v-model="HCustomer" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 销售员: |
| | | </view> |
| | | <view class="right general"> |
| | | <input type="text" v-model="HSeller" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="button-zone"> |
| | | <button type="default" class="btn-a" size="mini" @tap="cmdSearch">查询</button> |
| | | <button type="default" class="btn-c" size="mini" @tap="exit">退出</button> |
| | | </view> |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | <view class="info-list-zone"> |
| | | <view class="card-item" v-for="(item, index) in listDataShow"> |
| | | <uni-card :title="item['单据号']" note="Tips"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item['业务员']"> |
| | | <text>销售员:</text>{{item['业务员']}} |
| | | </view> |
| | | <view class="detail" v-if="item['客户']"> |
| | | <text>客户:</text>{{item['客户']}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>发货通知单数量:</text>{{item['数量']}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>剩余可出库数量:</text>{{item['数量'] - item['已关联数量']}} |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="operations != index"> |
| | | <view class="part" @tap.stop="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="op" v-if="operations == index"> |
| | | <input class="input1" type="number" v-model="SeOutNumber" /> |
| | | <button class="op3" size="mini" plain @tap.stop="submit(item)">出库</button> |
| | | <button class="op5" size="mini" plain |
| | | @tap.stop="operations = -1,this.SeOutNumber = 0">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | <view class="pagination-zone"> |
| | | <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total" |
| | | :current="paginationMeta.current" @change="onPaginationChangeHandler"></uni-pagination> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | import { |
| | | MpaasScan |
| | | } from '@/utils/mpaasScan.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | operations: -1, |
| | | navHeight: 0, |
| | | HWHNameList: [], |
| | | arrayHWHName: [], |
| | | HStockPlaceNameList: [], |
| | | arrayHStockPlaceName: [], |
| | | HIsStockMgr: false, |
| | | scrollTop: 0, |
| | | HBarCode: '101.2100233250718000007', |
| | | HMaterialID: '', |
| | | HBillNo: '', |
| | | HCustomer: '', |
| | | HSeller: '', |
| | | SeOutNumber: 0, |
| | | |
| | | materMeta: {}, |
| | | |
| | | |
| | | paginationMeta: { |
| | | current: 1, |
| | | total: 0, |
| | | pageSize: 30, |
| | | }, |
| | | |
| | | listData: [], |
| | | listDataShow: [], |
| | | |
| | | hform: { |
| | | HBillNo: '', |
| | | HInterID: '', |
| | | HBillSubType: 1205, |
| | | HDate: getDateTime.dateTimeStr('y-m-d'), |
| | | BillType: 1402, |
| | | |
| | | |
| | | // 通过item赋值 |
| | | HMainSourceInterID: '0', |
| | | HMainSourceEntryID: '0', |
| | | HMainSourceBillType: '', |
| | | HMainSourceBillNo: '', |
| | | "HEmpName": "", |
| | | "HEmpID": "", |
| | | "HDeptName": "", |
| | | "HDeptID": "0", |
| | | "HManagerName": "", |
| | | "HManagerID": "0", |
| | | "HSupName": "", |
| | | "HSupID": "", |
| | | "HLinkMan": "", |
| | | "HLinkPhone": "", |
| | | HSecManagerName: getUserInfo().HSecManager, |
| | | HSecManagerID: getUserInfo().HSecManagerID, |
| | | HKeeperName: getUserInfo().HKeeper, |
| | | HKeeperID: getUserInfo().HKeeperID, |
| | | "HRemark": "", |
| | | "HProjectNumber": "", |
| | | "HProjectID": "0", |
| | | "HProjectName": "", |
| | | "HGroupName": "", |
| | | "HGroupID": "0", |
| | | HWHName: getUserInfo().HWHName, |
| | | HWHID: getUserInfo().HWhID, |
| | | "HConveyCompName": "", |
| | | "HConveyCompID": "0", |
| | | "HConveyTypeName": "", |
| | | "HConveyTypeID": "0", |
| | | "HConveyMoney": "0", |
| | | "HCarriage": "0", |
| | | "HSTOCKORGID": uni.getStorageSync("OrganizationID"), |
| | | "HOWNERID": uni.getStorageSync("OrganizationID"), |
| | | "HSCWHName": "", |
| | | "HSCWHID": "0", |
| | | "HCheckStatusMan": "", |
| | | "HExplanation": "", |
| | | "HInnerBillNo": "", |
| | | "HCurName": "", |
| | | "HCurID": "", |
| | | "HExRate": "", |
| | | "HSellSName": "", |
| | | "HSellSID": "0", |
| | | "HCusBalance": "0", |
| | | "HCreditRating_Now": "0", |
| | | "HAvailableBalance": "0", |
| | | "HPriceType": "成本价", |
| | | "HOrgID": uni.getStorageSync("OrganizationID"), |
| | | "HMaker": getUserInfo()['Czymc'], |
| | | "HUpDater": "", |
| | | "HChecker": "", |
| | | "HMakeDate": getDateTime.dateTimeStr('y-m-d'), |
| | | "HUpDateDate": "", |
| | | "HCheckDate": "", |
| | | "HCloseMan": "", |
| | | "HDeleteMan": "", |
| | | "HCloseDate": "", |
| | | "HDeleteDate": "", |
| | | }, |
| | | |
| | | subform: [{ |
| | | "HMaterID": '', |
| | | "物料代码": "", |
| | | "物料名称": "", |
| | | "规格型号": "", |
| | | "HUnitID": '', |
| | | "计量单位": "", |
| | | "HQtyMust": "", |
| | | "HQty": '', |
| | | "HPieceQty": "", |
| | | "HPrice": '', |
| | | "HTaxPrice": '', |
| | | "HTaxRate": '', |
| | | "HMoney": '', |
| | | "HTaxMoney": '', |
| | | "HWHID": getUserInfo().HWhID, |
| | | "发货仓库": getUserInfo().HWHName, |
| | | "HRemark": "", |
| | | "HQty_Full": "0", |
| | | "HQty_Empty": "0", |
| | | "HQty_Back": "0", |
| | | "HCostPrice": "0", |
| | | "HCostMoney": "0", |
| | | "HSalePrice": "0", |
| | | "HSeOrderInterID": "0", |
| | | "HSeOrderEntryID": "0", |
| | | "HSeOrderBillNo": "", |
| | | "HSourceInterID": "0", |
| | | "HSourceEntryID": "0", |
| | | "HSourceBillNo": "", |
| | | "HSourceBillType": "", |
| | | "HRelationQty": "0", |
| | | "HRelationMoney": "0", |
| | | "HSPID": "0", |
| | | "HSPName": "", |
| | | "HSPGroupID": "0", |
| | | "HSPGroupName": "", |
| | | "HSCWHID": "0", |
| | | "HSCWHName": "", |
| | | "HSCSPID": "0", |
| | | "HSCSPName": "", |
| | | "HBatchNo": "", |
| | | "HPOOrderInterID": "0", |
| | | "HPOOrderEntryID": "0", |
| | | "HPOOrderBillNo": "", |
| | | "HPropertyID": "0", |
| | | "HPropertyName": "", |
| | | "HSecUnitID": "0", |
| | | "HSecUnitName": "", |
| | | "HSecUnitRate": "0", |
| | | "HEngineNum": "", |
| | | "HUnderPanNum": "", |
| | | "HLeaveFactCard": "", |
| | | "HReqBuyQty": "0", |
| | | "HReqOutQty": "0", |
| | | "HCurrentInventory": "0", |
| | | }] |
| | | } |
| | | }, |
| | | methods: { |
| | | clearPage() { |
| | | this.HMaterialID= '' |
| | | this.HBillNo= '' |
| | | this.HCustomer= '' |
| | | this.HSeller= '' |
| | | this.SeOutNumber= 0 |
| | | this.operations= -1 |
| | | }, |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval': '10', //超时时间 |
| | | 'timeoutText': '未识别到二维码' //超时提醒 |
| | | }, (ret) => { |
| | | console.log(ret.resp_result) |
| | | this.HBarCode = ret.resp_result |
| | | this.getCode(ret.resp_result) |
| | | }) |
| | | }, |
| | | exit() { |
| | | uni.navigateBack() |
| | | }, |
| | | async getCode(BarCode) { |
| | | console.log(BarCode) |
| | | try { |
| | | let barCodeMeta = await this.getMaterialInfo(BarCode) |
| | | console.log('barCodeMeta: ', barCodeMeta); |
| | | this.HMaterialID = barCodeMeta[0]['HMaterID'] |
| | | this.getMater() |
| | | this.cmdSearch() |
| | | } catch (err) { |
| | | return |
| | | } |
| | | }, |
| | | async submit(item) { |
| | | console.log('item: ', item); |
| | | console.log('this.SeOutNumber: ', this.SeOutNumber); |
| | | if (this.SeOutNumber < 1) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '出库数量不得小于1' |
| | | }) |
| | | } |
| | | if (item['数量'] - item['已关联数量'] < this.SeOutNumber) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '出库数量不得大于剩余可出库数量' |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | let MaxNum = await this.getMaxNum() |
| | | let { |
| | | HBillNo, |
| | | HInterID |
| | | } = MaxNum[0] |
| | | |
| | | this.hform.HBillNo = HBillNo |
| | | this.hform.HInterID = HInterID |
| | | this.hform.HSourceBillNo = item['单据号'] |
| | | this.hform.HSourceBillType = item['HBillType'] |
| | | this.hform.HMainSourceInterID = item['hmainid'] |
| | | this.hform.HMainSourceEntryID = item['hsubid'] |
| | | this.hform.HEmpName = item['业务员'] |
| | | this.hform.HEmpID = item['HEmpID'] |
| | | this.hform.HDeptID = item['HDeptID'] |
| | | this.hform.HDeptName = item['部门'] |
| | | this.hform.HSupName = item['客户'] |
| | | this.hform.HSupID = item['HSupID'] |
| | | this.hform.HLinkMan = item['HLinkMan'] |
| | | this.hform.HLinkPhone = item['联系电话'] |
| | | this.hform.HManagerID = item['HManagerID'] |
| | | this.hform.HManagerName = item['主管'] |
| | | this.hform.HProjectID = item['HProjectID'] |
| | | this.hform.HProjectName = item['项目名称'] |
| | | this.hform.HProjectNumber = item['项目编码'] |
| | | this.hform.HWHID = item['HWHID'] |
| | | this.hform.HWHName = item['发货仓库'] |
| | | this.hform.HCurName = item['币别'] |
| | | this.hform.HCurID = item['HCurID'] |
| | | this.hform.HExRate = Number(item['汇率']) |
| | | this.hform.HSellSID = '0' |
| | | this.hform.HSellSName = item['销售方式'] |
| | | let HQty = this.SeOutNumber; |
| | | let HPrice = item['单价']; //单价 |
| | | let HMoney = HQty * HPrice; |
| | | console.log(this.materMeta) |
| | | this.subform[0] = { |
| | | 'HMaterID': this.materMeta['HItemID'], |
| | | "物料代码": this.materMeta['物料代码'], |
| | | "物料名称": this.materMeta['物料名称'], |
| | | "规格型号": this.materMeta['规格型号'], |
| | | "HUnitID": this.materMeta['HUnitID'], |
| | | "计量单位": this.materMeta['基本计量单位'], |
| | | "HQty": this.SeOutNumber, |
| | | "HPieceQty": "0", |
| | | "HPrice": HPrice, |
| | | "HTaxPrice": "0", |
| | | "HTaxRate": "0", |
| | | "HMoney": HMoney, |
| | | "HTaxMoney": "0", |
| | | "HWHID": item.HWHID, |
| | | "发货仓库": item['发货仓库'], |
| | | "HRemark": "", |
| | | "HQty_Full": "0", |
| | | "HQty_Empty": "0", |
| | | "HQty_Back": "0", |
| | | "HCostPrice": "0", |
| | | "HCostMoney": "0", |
| | | "HSalePrice": "0", |
| | | "HSeOrderInterID": item.hmainid, |
| | | "HSeOrderEntryID": item.hsubid, |
| | | "HSeOrderBillNo": item.单据号, |
| | | "HSourceInterID": item.hmainid, |
| | | "HSourceEntryID": item.hsubid, |
| | | "HSourceBillNo": item.单据号, |
| | | "HSourceBillType": item.HBillType, |
| | | "HRelationQty": "0", |
| | | "HRelationMoney": "0", |
| | | 'HSPID': "0", |
| | | 'HSPName': "", |
| | | 'HSPGroupID': "0", |
| | | "HSPGroupName": "", |
| | | 'HSCWHID': "0", |
| | | 'HSCWHName': "", |
| | | 'HSCSPID': "0", |
| | | 'HSCSPName': "", |
| | | 'HBatchNo': "", |
| | | 'HPOOrderInterID': "0", |
| | | 'HPOOrderEntryID': "0", |
| | | 'HPOOrderBillNo': "", |
| | | 'HPropertyID': "0", |
| | | 'HPropertyName': "", |
| | | 'HSecUnitID': "0", |
| | | 'HSecUnitName': "", |
| | | 'HSecUnitRate': "0", |
| | | 'HEngineNum': "", |
| | | 'HUnderPanNum': "", |
| | | 'HLeaveFactCard': "", |
| | | 'HReqBuyQty': "0", |
| | | 'HReqOutQty': "0", |
| | | 'HCurrentInventory': "0" |
| | | } |
| | | await this.$nextTick() |
| | | |
| | | let sMainStr = JSON.stringify(this.hform) |
| | | let sSubStr = JSON.stringify(this.subform) |
| | | let sMainSub = sMainStr + ';' + sSubStr + ';' + getUserInfo()["Czymc"] + ';' + 1; |
| | | |
| | | CommonUtils.doRequest2({ |
| | | method: 'POST', |
| | | url: '/Kf_SellOutBill/SaveSellOutBillList', |
| | | data: { |
| | | msg: sMainSub |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count = 1) { |
| | | uni.showModal({ |
| | | title: '提交成功', |
| | | content: '是否继续出库?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.clearPage() |
| | | this.getCode() |
| | | } else if (res.cancel) { |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | }); |
| | | }else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | |
| | | } catch { |
| | | return |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | async getMaxNum() { |
| | | return new Promise((resolve, reject) => { |
| | | CommonUtils.doRequest2({ |
| | | url: "/WEBSController/GetMaxBillNoAndID_Json", |
| | | data: { |
| | | "HBillType": '1205' |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data |
| | | if (count == 1) { |
| | | resolve(data) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | reject() |
| | | } |
| | | }, |
| | | errFunction: () => { |
| | | reject() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | async getMaterialInfo(BarCode) { |
| | | return new Promise((resolve, reject) => { |
| | | CommonUtils.doRequest2({ |
| | | url: "/Gy_BarCodeBillList/GetBarCodeBillList", |
| | | data: { |
| | | sWhere: ` and 条码编号 = N'${BarCode}'`, |
| | | user: getUserInfo()['Czymc'] |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data |
| | | if (count == 1) { |
| | | resolve(data) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | reject() |
| | | } |
| | | }, |
| | | errFunction: () => { |
| | | reject() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | getMater() { |
| | | CommonUtils.doRequest2({ |
| | | url: '/Gy_Material/page', |
| | | data: { |
| | | sWhere: ` and 1 = 1 and HItemID = ${this.HMaterialID}`, |
| | | user: getUserInfo()['Czymc'], |
| | | // Organization: uni.getStorageSync('Organization'), |
| | | Organization: '', |
| | | page: 1, |
| | | size: 50, |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.materMeta = data[0] |
| | | |
| | | this.$forceUpdate() |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | onArrayHWHNameChangeHandler(e) { |
| | | let index = this.HWHNameList.findIndex(p => p.HName == e) |
| | | if (index != -1) { |
| | | this.hform.HWHID = this.HWHNameList[index].HItemID |
| | | this.HIsStockMgr = this.HWHNameList[index].HIsStockMgr |
| | | } |
| | | }, |
| | | getWHInfo() { |
| | | CommonUtils.doRequest( |
| | | "/Web/GetWarehouseList_Json_New", { |
| | | Warehouse: "", |
| | | HOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HWHNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHWHName[i] = data[i]["HName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | onArrayHStockPlaceNameChangeHandler() { |
| | | let index = this.HStockPlaceNameList.findIndex(p => p.HName == e) |
| | | if (index != -1) { |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[index].HItemID |
| | | } |
| | | }, |
| | | getStockPlaceInfo() { |
| | | CommonUtils.doRequest( |
| | | "/WEBSController/GetStockPlaceList_Json", { |
| | | StockPlace: '', |
| | | HWhID: this.hform.HWHID, |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | console.log(res1) |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HStockPlaceNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = data[i]["HWhName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | cmdSearch() { |
| | | let sWhere = '' |
| | | if (CommonUtils.isEmpty(this.HMaterialID)) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '还未通过扫码获取物料编码,请先扫码!' |
| | | }) |
| | | } |
| | | sWhere += ` and HMaterID = ${this.HMaterialID} and 数量 > 已关联数量` |
| | | if (!CommonUtils.isEmpty(this.HBillNo)) { |
| | | sWhere += ` and 单据号 = N'${this.HMaterialID}'` |
| | | } |
| | | if (!CommonUtils.isEmpty(this.HCustomer)) { |
| | | sWhere += ` and 客户 = N'${this.HCustomer}'` |
| | | } |
| | | if (!CommonUtils.isEmpty(this.HSeller)) { |
| | | sWhere += ` and 业务员 = N'${this.HSeller}'` |
| | | } |
| | | |
| | | CommonUtils.doRequest2({ |
| | | url: '/Xs_SeOutStockBill/list', |
| | | data: { |
| | | 'user': getUserInfo()['Czymc'], |
| | | 'sWhere': sWhere |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count > 0) { |
| | | console.log('Xs_SeOutStockBill data: ', data); |
| | | this.listData = data |
| | | this.paginationMeta.total = data.length |
| | | this.onPaginationChangeHandler({ |
| | | current: 1 |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | async onPaginationChangeHandler({ |
| | | current |
| | | }) { |
| | | this.listDataShow = |
| | | this.listData.slice((current - 1) * this.paginationMeta.pageSize, |
| | | current * this.paginationMeta.pageSize) |
| | | |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .page { |
| | | /* #ifdef APP */ |
| | | height: calc(100vh); |
| | | /* #endif */ |
| | | /* #ifndef APP */ |
| | | height: calc(100vh - 44px); |
| | | /* #endif */ |
| | | box-sizing: border-box; |
| | | padding: 20rpx 10rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | position: relative; |
| | | |
| | | .button-zone { |
| | | height: auto; |
| | | box-sizing: border-box; |
| | | padding: 20rpx 0; |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | flex-wrap: wrap; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #ff5722; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .search-condition-zone { |
| | | height: auto; |
| | | box-sizing: border-box; |
| | | padding: 0 60rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | align-items: center; |
| | | |
| | | .left { |
| | | font-size: 32rpx; |
| | | width: 6em; |
| | | } |
| | | |
| | | .right { |
| | | flex: 1; |
| | | padding: 8rpx 16rpx; |
| | | |
| | | .search { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | } |
| | | |
| | | .general { |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .disabled { |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | .uni-combox { |
| | | box-sizing: border-box; |
| | | padding: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .info-list-zone { |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | |
| | | .card-item { |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .pagination-zone { |
| | | height: 80rpx; |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | justify-content: center; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | margin-top: 20rpx; |
| | | gap: 12rpx; |
| | | height: 100%; |
| | | |
| | | button { |
| | | padding: 0; |
| | | width: 120rpx; |
| | | font-size: 25rpx; |
| | | } |
| | | |
| | | .input1 { |
| | | flex: 1; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 8rpx 12rpx; |
| | | border: #555 solid 1px; |
| | | border-radius: 12rpx; |
| | | font-size: 25rpx; |
| | | |
| | | } |
| | | |
| | | .op1 { |
| | | border: 1px solid #41a863; |
| | | color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | border: 1px solid #d98d00; |
| | | color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | border: 1px solid #3a78ff; |
| | | color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | border: 1px solid #da0000; |
| | | color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | border: 1px solid #888; |
| | | color: #888; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | HMainID: '', |
| | | HSubID: '', |
| | | HBillNo: '', |
| | | HBillType: '', |
| | | HMaterID: '', |
| | | HMaterNumber: '', |
| | | HMaterName: '', |
| | |
| | | HMainID: data[0].hmainid, |
| | | HSubID: data[0].hsubid, |
| | | HBillNo: data[0].单据号, |
| | | HBillType: data[0]['HBillType'], |
| | | HSourceBillNo: data[0].单据号, |
| | | HInnerBillNo: data[0].采购订单号, |
| | | HMaterID: data[0].HMaterID, |
| | |
| | | listDataTemp.push(Object.assign(baseInfoClone, { |
| | | HQty: this.baseInfo.HMinQty, |
| | | HInterID: receiveQty + 1, |
| | | HBatchNo: '', |
| | | HMTONo: '', |
| | | })) |
| | | } else { |
| | | listDataTemp.push(Object.assign(baseInfoClone, { |
| | | HQty: receiveQty % this.baseInfo.HMinQty, |
| | | HInterID: receiveQty + 1, |
| | | HBatchNo: '', |
| | | HMTONo: '', |
| | | })) |
| | | } |
| | | barCodeNo = |
| | |
| | | if (res.data.count == 1) { |
| | | if(res.data.code == 2) { |
| | | // 数据已存在的情况 |
| | | console.log(res.data.data) |
| | | console.log(listDataTemp) |
| | | this.listData = Array.from(res.data.data).map(item => { |
| | | let baseInfoClone = JSON.parse(JSON.stringify(this.baseInfo)) |
| | | return Object.assign(baseInfoClone, { |
| | | HQty: item['HQty'], |
| | | HBarCodeNo: item['HBarCode'] |
| | | }) |
| | | |
| | | }) |
| | | }else { |
| | | this.codeGenComplete = true |
| | | console.log(this.listData) |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | |
| | | }, |
| | | complete() { |
| | | complete: () => { |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | if (errorTip != null) { |