1.采购到货功能开发2.新增采购入库菜单、入库检验菜单
| | |
| | | // å¯ç éç½® |
| | | export const ResettUserPassword = (data) => http.post('/Login/ResettUserPassword' + |
| | | data) |
| | | |
| | | |
| | | // éè´å°è´§ï¼è·åéè´è®¢åå表 |
| | | export const MesAppPurchOrderSearch = (config = {}) => http.get( |
| | | '/AppPurchManagement/MesAppPurchOrderSearch', config) |
| | | |
| | | // éè´å°è´§ï¼éæ©éè´è®¢åè·åç©æä¿¡æ¯ |
| | | export const MesAppPurchOrderPartSearch = (data, config = {}) => http.get( |
| | | '/AppPurchManagement/MesAppPurchOrderPartSearch?purchordercode=' + data, config) |
| | | |
| | | |
| | | // éè´ä¾æ¹ä¿¡æ¯æ¥è¯¢ |
| | | export const PurchSupplierSelect = (config = {}) => http.get( |
| | | '/BaseDate/PurchSupplierSelect', config) |
| | | |
| | | // åä½ä¿¡æ¯æ¥è¯¢ |
| | | export const UnitSerch = (config = {}) => http.get( |
| | | '/BaseDate/UnitSerch', config) |
| | | |
| | | |
| | | // éè´å°è´§ï¼çæç³»ç»æ¡ç |
| | | export const MesAppPurchOrderLabelBarCode = (data, config = {}) => http.get( |
| | | '/AppPurchManagement/MesAppPurchOrderLabelBarCode' + data, config) |
| | | |
| | | |
| | | //éè´å°è´§ï¼æäº¤ |
| | | export const MesAppPurchOrderSave = (data1, data2, config = {}) => http.post( |
| | | '/AppPurchManagement/MesAppPurchOrderSave' + data1, data2, config) |
| | | |
| | | |
| | | |
| | | //éè´å
¥åºéæ©æå°è´§éè´è®¢å |
| | | export const MesAppPurchInStorSelectCGOrder = (data, config = {}) => http.get( |
| | | '/AppPurchManagement/MesAppPurchInStorSelectCGOrder', |
| | | data, config) |
| | | |
| | | // éæ©éè´è®¢å带åºè®¢å䏿å°è´§çç©æä¿¡æ¯ |
| | | export const MesAppPurchInStorSelectCGOrderPart = (data, config = {}) => http.get( |
| | | '/AppPurchManagement/MesAppPurchInStorSelectCGOrderPart' + |
| | | data, config) |
| | | |
| | | |
| | | // éè´å
¥åºæ«ææ ç¾æ¡ç å¸¦åºæ ç¾ä¿¡æ¯ |
| | | export const MesAppPurchInStorScanLabCode = (data, config = {}) => http.get( |
| | | '/AppPurchManagement/MesAppPurchInStorScanLabCode' + |
| | | data, config) |
| | | |
| | | |
| | | |
| | | // å
¥åæ£éª,æ«æéè´å°è´§çææ ç¾ |
| | | export const InFactoryCheckScanLabCode = (data, config = {}) => http.get( |
| | | '/AppQualityManagement/InFactoryCheckScanLabCode' + |
| | | data, config) |
| | | |
| | | //å
¥åæ£éª,æ ¹æ®éæ©çæ£éªæ¹æ¡æ¥æ¾æ£éªé¡¹ç® |
| | | export const InFactoryCheckItem = (data, config = {}) => http.get( |
| | | '/AppQualityManagement/InFactoryCheckItem' + |
| | | data, config) |
| | |
| | | ...App |
| | | }) |
| | | |
| | | Vue.prototype.$appVersion = 'v1.0.3' //APPå½åçæ¬ |
| | | // Vue.prototype.$appVersion = 'v1.0.3' //APPå½åçæ¬ //壿²£çæ¬ |
| | | Vue.prototype.$appVersion = 'v1.0.1' //APPå½åçæ¬ //大å²çæ¬ |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8021/api' //æ¬å°äº§å å·¨åçæ°æ®åº |
| | | // Vue.prototype.$baseUrl = 'http://122.227.18.22:8000/api' //æ¬å°äº§å å·¨ç«é²æ¤ï¼å®¢æ·å°åï¼ |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8019/api' // |
| | | Vue.prototype.$baseUrl = 'http://121.196.36.24:8032/api' //壿²£é¡¹ç® |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8032/api' //壿²£é¡¹ç® |
| | | // Vue.prototype.$baseUrl = 'http://192.168.2.254:8000/api' //壿²£é¡¹ç® 客æ·ç°åºå®é
æå¡å¨ip |
| | | |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8039/api' //大å²é¡¹ç®ï¼2.0ï¼ |
| | | // Vue.prototype.$baseUrl = 'http://192.168.2.138:8080/api' //大å²é¡¹ç®ï¼2.0ï¼ å®¢æ·ç°åºå®é
æå¡å¨ip |
| | | |
| | | |
| | | Vue.prototype.$baseUrl = 'http://121.196.36.24:9090/api' //ææ°äº§å 2025/5/8 |
| | | |
| | | |
| | | Vue.prototype.$companyType = 'B' //ä¼ä¸ç±»åï¼é¡¹ç®ç±»åï¼ Aï¼å·¨åï¼Bï¼å£æ²£ï¼ãB: 产å |
| | | |
| | | // A: http://121.196.36.24:8021/api http://122.227.18.22:8000/api |
| | |
| | | import global from '@/static/js/global.js'; //å¼å
¥èªå®ä¹å
¨å± jsæ¹æ³ |
| | | Vue.prototype.global = global; |
| | | |
| | | setTimeout(() => { |
| | | uni.getSystemInfo({ |
| | | success: (res) => { |
| | | console.log(res, 9999) |
| | | Vue.prototype.$DeviceInformation = res |
| | | } |
| | | }) |
| | | }, 1000) |
| | | |
| | | |
| | | // å¼å
¥è¯·æ±å°è£
ï¼å°appåæ°ä¼ éå°é
ç½®ä¸ |
| | | require('./config/request')(app) |
| | |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wlgl/cgrk", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å
¥åº", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/wlgl/cgrk2", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å
¥åº", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/wlgl/cgrk3", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å
¥åº", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wlgl/cgdh", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å°è´§", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wlgl/cgdh2", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å°è´§", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/wlgl/cgdh3", |
| | | "style": { |
| | | "navigationBarTitleText": "éè´å°è´§", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/zlgl/rcjy", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¥åæ£éª", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/zlgl/rcjy2", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¥åæ£éª", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/zlgl/rcjy3", |
| | | "style": { |
| | | "navigationBarTitleText": "å
¥åæ£éª", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | } |
| | | ], |
| | | "globalStyle": { |
| | |
| | | </view> |
| | | |
| | | |
| | | <view class="footer"> |
| | | <view class="footer" style="display: flex;flex-direction: row;"> |
| | | <u-button :loading="isDisabledSubmitButtonReset" loadingText="éç½®ä¸..." |
| | | style='width: 50%;border-radius: 10rpx 0 0 10rpx;' type="success" @click="resetPassword" text="éç½®å¯ç " |
| | | style='width: 49%;border-radius: 10rpx 0 0 10rpx;' type="success" @click="resetPassword" text="éç½®å¯ç " |
| | | size="large"> |
| | | </u-button> |
| | | <u-button :loading="isDisabledSubmitButtonEdit" loadingText="ä¿®æ¹ä¸..." |
| | | style='width: 50%;border-radius:0 10rpx 10rpx 0' @click="editPassword" type="primary" text="ä¿®æ¹å¯ç " |
| | | style='width: 49%;border-radius:0 10rpx 10rpx 0' @click="editPassword" type="primary" text="ä¿®æ¹å¯ç " |
| | | size="large"></u-button> |
| | | </view> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="夿é
é"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="éè´å°è´§"></page-nav> |
| | | <view class="body"> |
| | | <u-button type="primary" icon='plus-circle' size='large' style="width: 96%;margin-left: 2%;" :plain="true" |
| | | :hairline="true" @click="navigateTo" 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: './cgdh2' |
| | | }); |
| | | }, |
| | | 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="éè´å°è´§"></page-nav> |
| | | |
| | | |
| | | <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 { |
| | | MesAppPurchOrderSearch |
| | | } 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: './cgdh3?ordercode=' + this.radioValue |
| | | }); |
| | | }, |
| | | async getMesAppPurchOrderSearch() { |
| | | const res = await MesAppPurchOrderSearch() |
| | | |
| | | 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="éè´å°è´§"></page-nav> |
| | | |
| | | |
| | | <view class="mainContent" :style="{maxHeight: '1340rpx',overflow: 'scroll'}"> |
| | | <view> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | ç©æä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | <!-- <view style="margin-right: 10rpx;font-weight: bold;"> |
| | | {{cgdh}} |
| | | </view> --> |
| | | </view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <!-- <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ç©æä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view style="padding:20rpx 20rpx 20rpx 30rpx;"> |
| | | |
| | | |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class="marginBottom20 flex_column" style="width: 100%;" |
| | | @click="radioValueClick(item.partcode)" v-for="(item,index) in purchorderArr" |
| | | :key="item.partcode"> |
| | | |
| | | |
| | | |
| | | <view class="orderNumber" :key="item.partcode"> |
| | | {{(index+1).toString().padStart(2,0)}} |
| | | </view> |
| | | |
| | | <view class="trash" @click="trashClick(index)" v-show="purchorderArr.length>1"> |
| | | <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"> |
| | | <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.partcode}}</view> |
| | | <view>{{item.partname}}</view> |
| | | <view>{{item.partspec?item.partspec:'/'}}</view> |
| | | <!-- <view>{{item.quantity+"/"+item.countarrivalquantity}}</view> --> |
| | | <view>{{cgdh}}</view> |
| | | </view> |
| | | </view> |
| | | <u-radio size='20' :key="item.partcode" :name="item.partcode" |
| | | activeColor="red"></u-radio> |
| | | </view> |
| | | |
| | | <!-- <u-gap height="20" v-show="!item.arrowType" bgColor="#eff0f1" |
| | | style='width: 100%;'></u-gap> --> |
| | | |
| | | <view class="" v-show="!item.arrowType"> |
| | | <view class="head_block" style="margin-left: -20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | å°è´§ä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="" style="display: flex;flex-direction: column;"> |
| | | <view class="f_c_c"> |
| | | <view class="titleFont">便¹ä¿¡æ¯ï¼</view> |
| | | <view class="ellipsis contentFont" |
| | | style="width: 490rpx;padding-right: 15rpx;"> |
| | | {{item.customername}} |
| | | </view> |
| | | <!-- <view @click='gfxxClick' class="custominputClass"> |
| | | <view v-show='item.customername===""' |
| | | style="color: rgb(192, 196, 204);">è¯·éæ©</view> |
| | | <view v-show='item.customername!==""' class="ellipsis" |
| | | style="width: 390rpx;"> |
| | | {{item.customername}} |
| | | </view> |
| | | <u-icon |
| | | :name="!gfxxSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view v-if="item.is_batchno==='Y'" class="f_c_c"> |
| | | <view class="titleFont">éè´æ¹æ¬¡ï¼</view> |
| | | <u--input placeholder="请è¾å
¥" border="bottom" v-model="item.cgpc" |
| | | class="contentFont" |
| | | style="border-bottom: 3rpx #eff0f1 solid;margin-left: 20rpx;"></u--input> |
| | | </view> |
| | | <view class="f_c_c"> |
| | | <view class="titleFont">åä½ï¼</view> |
| | | <view class="ellipsis contentFont" |
| | | style="width: 490rpx;padding-right: 15rpx;"> |
| | | {{item.uomname}} |
| | | </view> |
| | | <!-- <view @click='dwClick' class="custominputClass"> |
| | | <view v-show='item.uomname===""' style="color: rgb(192, 196, 204);">è¯·éæ© |
| | | </view> |
| | | <view v-show='item.uomname!==""' class="ellipsis" |
| | | style="width: 390rpx;"> |
| | | {{item.uomname}} |
| | | </view> |
| | | <u-icon :name="!dwSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <!-- |
| | | <view class="f_c_c" style="margin-top: 10rpx;"> |
| | | <view class="">éè´åå·ï¼</view> |
| | | <u--input placeholder="请è¾å
¥" border="bottom" v-model="cgdh" disabled |
| | | style="border-bottom: 3rpx #eff0f1 solid;margin-left: 20rpx;"></u--input> |
| | | </view> --> |
| | | |
| | | <view v-show="!item.arrowType" class="f_c_c" |
| | | style="padding-bottom: 12rpx;margin-top:10rpx;"> |
| | | <view class="titleFont">éè´/å·²å°è´§ï¼</view> |
| | | <view style="display: flex;" class="contentFont"> |
| | | <view>{{item.quantity}} / </view> |
| | | <view style="color: rgb(41, 121, 255);margin-left: 10rpx;padding-right: 15rpx;"> |
| | | {{item.countarrivalquantity}} |
| | | </view> |
| | | </view> |
| | | <!-- <u--input placeholder="请è¾å
¥" border="bottom" disabled |
| | | :value='item.quantity+"/"+item.countarrivalquantity' |
| | | style="border-bottom: 3rpx #eff0f1 solid;margin-left: 20rpx;"></u--input> --> |
| | | </view> |
| | | |
| | | <view v-show="!item.arrowType" class="f_c_c numberBox" |
| | | style="margin-top: 20rpx;border: 0;"> |
| | | <view class="titleFont">å°è´§æ°éï¼</view> |
| | | <u-number-box inputWidth='110' v-model="item.dhsl" min='0' |
| | | :max='item.quantity-item.countarrivalquantity' class="contentFont" |
| | | @change="dhslChange"></u-number-box> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view v-show="!item.arrowType" class="head_block" |
| | | style="margin-left: -20rpx; margin-top:40rpx; "> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bold;"> |
| | | æ ç¾äº§åº |
| | | </view> |
| | | </view> |
| | | <view style="display: flex;align-items:center;position: relative;"> |
| | | <view |
| | | style="position: absolute;top: -6rpx;z-index: 2;right:174rpx;font-size: 26rpx;" |
| | | :style="{color:bqcc?'#eff0f1':'#2979FF'}" @click=" bqcc=!bqcc"> |
| | | ç³»ç»çæ |
| | | <!-- {{bqcc?'ç³»ç»çæ':'æ«ææ ç¾'}} --> |
| | | </view> |
| | | <view |
| | | style="position: absolute;top: -6rpx;z-index: 2;right:26rpx;font-size: 26rpx;" |
| | | :style="{color:!bqcc?'#eff0f1':'#2979FF'}" @click="bqcc=!bqcc"> |
| | | <!-- {{!bqcc?'ç³»ç»çæ':'æ«ææ ç¾'}} --> |
| | | æ«ææ ç¾ |
| | | </view> |
| | | <u-switch v-model="bqcc" @change="bqccChange"></u-switch> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-gap v-show="!item.arrowType" height="5" bgColor="#eff0f1" |
| | | style='width: 100%;border-radius: 10rpx;'></u-gap> |
| | | <view v-show="!item.arrowType" |
| | | style="display: flex;font-size: 28rpx;height: 46rpx;align-items: center;"> |
| | | <view style="color: rgb(41, 121, 255);margin-left: 10rpx;"> |
| | | {{purchorderArr[index].labelCount?purchorderArr[index].labelCount:0 }} |
| | | </view> |
| | | <vuew style="margin: 0 10rpx;"> / </vuew> |
| | | <view> {{item.dhsl}} pcs</view> |
| | | </view> |
| | | <u-gap v-show="!item.arrowType" height="5" bgColor="#eff0f1" |
| | | style='width: 100%;border-radius: 10rpx;'></u-gap> |
| | | |
| | | <u-button v-show="!item.arrowType" type="primary" icon='plus-circle' plain |
| | | style="height: 80rpx;width: 98%;margin-top: 10rpx;" @click="addLabel" |
| | | class='addClass' text="æ·»å "> |
| | | </u-button> |
| | | |
| | | <view v-show="!item.arrowType" class="flex_between titleFont" |
| | | style="margin: 20rpx 30rpx 30rpx;"> |
| | | <view style="width: 60rpx;">åºå·</view> |
| | | <view style="width: 170rpx;">ç©ææ ç¾</view> |
| | | <view style="width: 170rpx;">åæ ç¾æ°é</view> |
| | | <view>æä½</view> |
| | | </view> |
| | | |
| | | <view v-show="!item.arrowType" |
| | | class="flex_column marginLeft20 marginRight20 contentFont" :key="it.labcode" |
| | | v-for="(it,ind) in item.labelArr"> |
| | | <view class="flex_between marginLeft20 marginRight20"> |
| | | <view style="width: 60rpx;text-align: center;">{{(ind+1)}}</view> |
| | | <view style="width: 200rpx;text-align: center;">{{it.labcode}}</view> |
| | | <view style="width: 200rpx;text-align: center;">{{it.labqty}}</view> |
| | | <u-icon @click="deleteLabel(index,it)" style="width: 50rpx;text-align: center;" |
| | | name="trash" min='0' max='100' color="#2979ff" size="20"> |
| | | </u-icon> |
| | | </view> |
| | | <u-divider v-if="ind!==item.labelArr.length-1"></u-divider> |
| | | </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="16" v-if="index!==purchorderArr.length-1" bgColor="#eff0f1" |
| | | style='width: 110%;margin: 0rpx -5%;'></u-gap> |
| | | </view> |
| | | |
| | | </u-radio-group> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-button size="large" :loading="isDisabledSubmitButton" |
| | | :disabled="purchorderArr.map(i => i.labelArr).flat().length === 0" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | <!-- éè´ä¾æ¹ --> |
| | | <!-- <u-picker :show="gfxxSheetShow" :columns="gfxxColumns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='gfxxSheetShow=false' @confirm='gfxxPickerConfirm' @cancel='gfxxSheetShow=false'> |
| | | </u-picker> --> |
| | | <!-- åä½ --> |
| | | <!-- <u-picker :show="dwSheetShow" :columns="dwColumns" :itemHeight='55' :closeOnClickOverlay='true' |
| | | @close='dwSheetShow=false' @confirm='dwPickerConfirm' @cancel='dwSheetShow=false'> |
| | | </u-picker> --> |
| | | |
| | | <!-- æ·»å çå¼¹çªäºä»¶ --> |
| | | <u-modal :show="modalShow" :showCancelButton='true' cancelText='åæ¶' @close="modalShow=false" |
| | | :closeOnClickOverlay="true" @cancel="modalCancel" @confirm="modalConfirm"> |
| | | <view class="" style="display: flex;justify-content: flex-start;flex-direction: column;"> |
| | | <view>ç©æç¼ç ï¼{{modalContent.code}}</view> |
| | | <view>ç©æåç§°ï¼{{modalContent.name}}</view> |
| | | <view>å°è´§æ°éï¼{{modalContent.dhsl}}</view> |
| | | <view style="margin-top: 20rpx;display: flex;"> |
| | | <view>åæ ç¾æ°éï¼</view> |
| | | <u-number-box class="modelNumber" inputWidth='110' v-model="modalContent.numberBox" min='0' |
| | | :max='modalContent.dhsl' @change="modelNumberChange"></u-number-box> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | const modal = uni.requireNativePlugin("modal"); |
| | | import api from "../../static/js/lpapi-uniplugin"; |
| | | |
| | | import { |
| | | MesAppPurchOrderPartSearch, |
| | | PurchSupplierSelect, |
| | | UnitSerch, |
| | | MesAppPurchOrderLabelBarCode, |
| | | MesAppPurchOrderSave |
| | | |
| | | } from '../../config/api.js'; |
| | | import Vue from 'vue' |
| | | const App = getApp() |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | isDisabledSubmitButton: false, |
| | | radioValue: '', |
| | | |
| | | purchorderArr: [ |
| | | // { |
| | | // partcode: 'MO-001', |
| | | // partname: 'ç©æåç§°1', |
| | | // partspec: '#001', |
| | | // arrowType: false |
| | | // }, |
| | | // { |
| | | // partcode: 'MO-002', |
| | | // partname: 'ç©æåç§°1', |
| | | // partspec: '#001', |
| | | // arrowType: true |
| | | // }, |
| | | // { |
| | | // partcode: 'MO-003', |
| | | // partname: 'ç©æåç§°1', |
| | | // partspec: '#001', |
| | | // arrowType: true |
| | | // }, |
| | | // { |
| | | // partcode: 'MO-004', |
| | | // partname: 'ç©æåç§°1', |
| | | // partspec: '#001', |
| | | // arrowType: true |
| | | // }, |
| | | ], |
| | | |
| | | gfxxSheetShow: false, |
| | | gfxxArr: [], //便¹ä¿¡æ¯ |
| | | gfxxColumns: [ |
| | | ['æµè¯1', 'æµè¯2'] |
| | | ], |
| | | cgpc: '', //éè´æ¹æ¬¡ |
| | | dwSheetShow: false, |
| | | dwArr: [], //åä½ |
| | | dwColumns: [ |
| | | ['æµè¯1', 'æµè¯2'] |
| | | ], |
| | | cgdh: '', //éè´åå· |
| | | bqcc: true, |
| | | labelArr: [], |
| | | |
| | | modalShow: false, |
| | | modalContent: {}, |
| | | |
| | | labelCount: 0, //æ ç¾äº§åºæ°éå¼ |
| | | |
| | | printerList: [], |
| | | index: 0, |
| | | printerName: "", |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | |
| | | // this.getPurchSupplierSelect() |
| | | // this.getUnitSerch() |
| | | }, |
| | | async onLoad(option) { |
| | | |
| | | // this.openBluetoothAdapter() |
| | | // console.log("onLoad"); |
| | | // this.printerList.splice(0); |
| | | // const list = await api.getPrinters(); |
| | | // console.log(list, 8) |
| | | // if (list.length > 0) { |
| | | // for (let item of list) { |
| | | // console.log(item); |
| | | // this.printerList.push(item.name); |
| | | // } |
| | | // } else { |
| | | // this.printerList.push("æªæ£æµå°æå°æº"); |
| | | // } |
| | | // // èªå¨è¿æ¥æå°æº |
| | | // this.onPrinterChanged(); |
| | | // this.openPrinter() |
| | | |
| | | |
| | | this.cgdh = option.ordercode |
| | | this.getMesAppPurchOrderPartSearch() |
| | | }, |
| | | methods: { |
| | | // è·åæ ç¾ |
| | | async getMesAppPurchOrderLabelBarCode(partcode, arrivalqty, onelableqty) { |
| | | const data = { |
| | | partcode, |
| | | arrivalqty, |
| | | onelableqty |
| | | } |
| | | |
| | | const res = await MesAppPurchOrderLabelBarCode(this.global.formatData(data)) |
| | | |
| | | // this.labelArr = res.data |
| | | |
| | | // this.labelCount = 0 |
| | | // this.labelArr.map(i => i.labqty).forEach(i => { |
| | | // this.labelCount += parseFloat(i) |
| | | // }) |
| | | |
| | | this.purchorderArr.forEach(it => { |
| | | if (it.partcode === partcode) { |
| | | |
| | | it.labelArr = res.data |
| | | it.labelCount = 0 |
| | | res.data.map(i => i.labqty).forEach(i => { |
| | | it.labelCount += parseFloat(i) |
| | | }) |
| | | } |
| | | |
| | | // else { |
| | | // it.labelArr = [] |
| | | // it.labelCount = 0 |
| | | // } |
| | | }) |
| | | |
| | | console.log(this.purchorderArr, 88) |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | async getMesAppPurchOrderPartSearch() { |
| | | const res = await MesAppPurchOrderPartSearch(this.cgdh) |
| | | this.purchorderArr = res.data |
| | | this.purchorderArr.forEach((item, index) => { |
| | | item.cgpc = '' |
| | | item.dhsl = item.quantity - item.countarrivalquantity |
| | | item.arrowType = index !== 0 |
| | | // item.arrowType = true |
| | | item.labelArr = [] |
| | | if (index === 0) { |
| | | this.radioValue = item.partcode |
| | | } |
| | | }) |
| | | |
| | | // const that = this |
| | | // that.$nextTick(() => { |
| | | // console.log('11111') |
| | | // // setTimeout(() => {ss |
| | | // that.$forceUpdate() |
| | | // console.log('22222') |
| | | // // }, 1000) |
| | | // }) |
| | | |
| | | }, |
| | | // è·å便¹ä¿¡æ¯ä¸æ |
| | | async getPurchSupplierSelect() { |
| | | const res = await PurchSupplierSelect() |
| | | this.gfxxArr = res.data |
| | | this.gfxxColumns = [res.data.map(i => i.name)] |
| | | }, |
| | | // è·ååä½ä¸æ |
| | | async getUnitSerch() { |
| | | const res = await UnitSerch() |
| | | this.dwArr = res.data |
| | | this.dwColumns = [res.data.map(i => i.name)] |
| | | }, |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | radioValueClick(partcode) { |
| | | this.radioValue = partcode |
| | | }, |
| | | // ç®å¤´ç±åä¸å为å䏿¶è§¦å |
| | | arrowDownClick(val) { |
| | | console.log('æ§è¡äº111', val) |
| | | // val.arrowType = !val.arrowType |
| | | this.purchorderArr.forEach(i => { |
| | | if (i.partcode === val.partcode) { |
| | | i.arrowType = false |
| | | } else { |
| | | i.arrowType = true |
| | | } |
| | | }) |
| | | // val.arrowType = false |
| | | this.$forceUpdate() |
| | | }, |
| | | // ç®å¤´ç±åä¸å为å䏿¶è§¦å |
| | | arrowUpClick(val) { |
| | | console.log('æ§è¡äº222', val) |
| | | val.arrowType = true |
| | | this.$forceUpdate() |
| | | }, |
| | | gfxxClick() { |
| | | // this.gfxxSheetShow = true //ææ¶æ³¨é |
| | | }, |
| | | gfxxPickerConfirm(val) { |
| | | this.purchorderArr.forEach(i => { |
| | | if (i.partcode === this.radioValue) { |
| | | i.customername = val.value[0] |
| | | i.customercode = this.gfxxArr.find(it => it.name === val.value[0]).code |
| | | } |
| | | }) |
| | | this.gfxxSheetShow = false |
| | | }, |
| | | dwClick() { |
| | | // this.dwSheetShow = true //ææ¶æ³¨é |
| | | }, |
| | | dwPickerConfirm(val) { |
| | | this.purchorderArr.forEach(i => { |
| | | if (i.partcode === this.radioValue) { |
| | | i.uomname = val.value[0] |
| | | i.uomcode = this.dwArr.find(it => it.name === val.value[0]).code |
| | | } |
| | | }) |
| | | this.dwSheetShow = false |
| | | }, |
| | | |
| | | // å°è´§æ°é |
| | | dhslChange(val) { |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | // æ ç¾äº§åº |
| | | bqccChange(val) { |
| | | // this.$forceUpdate() |
| | | }, |
| | | |
| | | // æ·»å |
| | | addLabel() { |
| | | let temp = this.purchorderArr.find(i => i.partcode === this.radioValue) |
| | | this.modalContent.code = temp.partcode |
| | | this.modalContent.name = temp.partname |
| | | this.modalContent.dhsl = temp.dhsl |
| | | this.modalContent.numberBox = 0 |
| | | this.modalShow = true |
| | | }, |
| | | |
| | | // å é¤ |
| | | deleteLabel(number, val) { |
| | | // VAL ç¶ item valåit |
| | | |
| | | // this.labelArr = this.labelArr.filter(i => i.labcode !== val.labcode) |
| | | // this.labelCount = 0 |
| | | // this.labelArr.map(i => i.labqty).forEach(i => { |
| | | // this.labelCount += parseFloat(i) |
| | | // }) |
| | | console.log(number, val) |
| | | |
| | | this.purchorderArr[number].labelArr = this.purchorderArr[number].labelArr.filter(i => i.labcode !== val |
| | | .labcode) |
| | | this.purchorderArr[number].labelCount = 0 |
| | | |
| | | this.purchorderArr[number].labelArr.map(i => i.labqty).forEach(i => { |
| | | this.purchorderArr[number].labelCount += parseFloat(i) |
| | | }) |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | }, |
| | | |
| | | // æäº¤ |
| | | async submit() { |
| | | const data1 = { |
| | | purordercode: this.cgdh, |
| | | // orderstaus: this.labelCount + this.purchorderArr.find(i => i.partcode === this |
| | | // .radioValue).countarrivalquantity === this.purchorderArr.find(i => i.partcode === this |
| | | // .radioValue).quantity ? 'INARIVE' : 'BINARIVE', //åæ®ç¶æ:BINARIVE(é¨åå°è´§)ãINARIVE(å·²å°è´§) |
| | | username: uni.getStorageSync("username") |
| | | } |
| | | let submitData = JSON.parse(JSON.stringify(this.purchorderArr)) |
| | | // submitData = submitData.filter(i => parseFloat(i.labelCount)) |
| | | let data2 = [] |
| | | |
| | | |
| | | |
| | | // [{ |
| | | // "Inventory": { |
| | | // "Code": "81000241" |
| | | // }, |
| | | // "Unit": { |
| | | // "Name": "ç®±" |
| | | // }, |
| | | // "Quantity": 5, |
| | | // "OrigTaxAmount": 400, |
| | | // "OrigDiscountAmount": 400, |
| | | // "idsourcevouchertype": 27, |
| | | // "sourceVoucherCode": "PO-2021-09-0001", |
| | | // "sourceVoucherDetailId": 25 |
| | | // }] |
| | | |
| | | // let VoucherDetails = [] |
| | | |
| | | submitData.forEach(i => { |
| | | if (i.labelArr.length > 0) { |
| | | console.log(i.is_batchno) |
| | | data2.push({ |
| | | hacceptdate: i.acceptdate ? i.acceptdate : '', |
| | | hdepartmentcode: i.departmentcode ? i.departmentcode : '', |
| | | hcustomercode: i.customercode, |
| | | hbatchno: i.cgpc, |
| | | hsourcebillno: this.cgdh, |
| | | rownumber: i.rownumber, |
| | | hpartcode: i.partcode, |
| | | hplanqty: i.quantity, |
| | | hqty: i.labelCount, |
| | | hischeck: i.is_incheck, //ææ¶åæ» |
| | | children: i.labelArr |
| | | }) |
| | | |
| | | // VoucherDetails.push({ |
| | | // "Inventory": { |
| | | // "Code": i.partcode |
| | | // }, |
| | | // "Unit": { |
| | | // "Name": i.uomname |
| | | // }, |
| | | // "Quantity": i.dhsl, |
| | | // "OrigTaxPrice": 0, |
| | | |
| | | // "OrigTaxAmount": 0, |
| | | // "idsourcevouchertype": 27, |
| | | // "sourceVoucherCode": i.ordercode, |
| | | // "sourceVoucherDetailId": i.sbid |
| | | // }) |
| | | } |
| | | }) |
| | | |
| | | // console.log('ææ¯æå
æ§è¡ï¼') |
| | | // this.isDisabledSubmitButton = true |
| | | // const openToken = await this.global.getTPlusToken() |
| | | // console.log(openToken) |
| | | // console.log('ææ¯æåæ§è¡ï¼') |
| | | |
| | | // const headers = { |
| | | // 'openToken': openToken, |
| | | // 'appKey': Vue.prototype.$AppKey, |
| | | // 'appSecret': Vue.prototype.$AppSecret, |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | |
| | | // let DATA = { |
| | | // "dto": { |
| | | // "Code": this.cgdh, |
| | | // "IsModifiedCode": true, |
| | | // "VoucherDate": this.global.handleDatetime(new Date().getTime()), |
| | | // "ExternalCode": this.cgdh, |
| | | // "BusinessType": { |
| | | // "Code": "01" |
| | | // }, |
| | | // "Partner": { |
| | | // "Code": this.purchorderArr[0].customercode |
| | | // }, |
| | | // "Warehouse": { |
| | | // "Code": "03" //ä»åºç®åä¼ ç©º |
| | | // }, |
| | | // "VoucherDetails": VoucherDetails |
| | | // } |
| | | // } |
| | | this.isDisabledSubmitButton = true |
| | | MesAppPurchOrderSave(this.global.formatData( |
| | | data1), data2).then(res => { |
| | | if (res.code === '200') { |
| | | submitData.forEach(i => { |
| | | if (i.labelArr.length > 0) { |
| | | i.labelArr.forEach(it => { |
| | | this.printWL(it |
| | | .labcode, res |
| | | .data, |
| | | i.partcode, i |
| | | .partname, i |
| | | .partspec ? i |
| | | .partspec : |
| | | '/', it |
| | | .labqty) |
| | | }) |
| | | } |
| | | }) |
| | | let prevPage = getCurrentPages()[getCurrentPages() |
| | | .length - |
| | | 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | prevPage.$vm |
| | | .getMesAppPurchOrderSearch() // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | } |
| | | this.isDisabledSubmitButton = false |
| | | this.$u.toast(res.Message) |
| | | }) |
| | | |
| | | |
| | | // console.log(headers, DATA, 18) |
| | | |
| | | // await new Promise((resolve, reject) => { |
| | | // uni.request({ |
| | | // url: Vue.prototype.$chanjetBaseUrl + |
| | | // '/tplus/api/v2/PurchaseArrivalOpenApi/Create', |
| | | // data: DATA, |
| | | // method: 'POST', |
| | | // header: headers, |
| | | // success: (r2) => { |
| | | // console.log(r2) |
| | | // if (r2.data.code === 0) { |
| | | // MesAppPurchOrderSave(this.global.formatData( |
| | | // data1), data2).then(res => { |
| | | // if (res.code === '200') { |
| | | // submitData.forEach(i => { |
| | | // if (i.labelArr.length > 0) { |
| | | // i.labelArr.forEach(it => { |
| | | // this.printWL(it |
| | | // .labcode, res |
| | | // .data, |
| | | // i.partcode, i |
| | | // .partname, i |
| | | // .partspec ? i |
| | | // .partspec : |
| | | // '/', it |
| | | // .labqty) |
| | | // }) |
| | | // } |
| | | // }) |
| | | // let prevPage = getCurrentPages()[getCurrentPages() |
| | | // .length - |
| | | // 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | // prevPage.$vm |
| | | // .getMesAppPurchOrderSearch() // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | // uni.navigateBack({ |
| | | // delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | // }) |
| | | // } |
| | | // this.$u.toast(res.Message) |
| | | // this.isDisabledSubmitButton = false |
| | | // }) |
| | | |
| | | // } else { |
| | | // this.$u.toast('æ¥å£æ¥éï¼è¯·èç³»å¼å人å!') |
| | | // this.isDisabledSubmitButton = false |
| | | // } |
| | | // }, |
| | | // fail: (e) => { |
| | | // console.log(e, 7) |
| | | // } |
| | | |
| | | // }) |
| | | // }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | // æ¨¡ææ¡åæ¶ |
| | | modalCancel() { |
| | | this.modalShow = false |
| | | }, |
| | | |
| | | // æ¨¡ææ¡ç¡®è®¤ |
| | | modalConfirm() { |
| | | this.getMesAppPurchOrderLabelBarCode(this.modalContent.code, this.modalContent.dhsl, this |
| | | .modalContent |
| | | .numberBox) |
| | | this.modalShow = false |
| | | }, |
| | | |
| | | // æ¨¡ææ¡æ°å¼æ¹å |
| | | modelNumberChange() { |
| | | |
| | | }, |
| | | // å é¤äºä»¶ç¹å» |
| | | trashClick(val) { |
| | | this.purchorderArr.splice(val, 1) |
| | | }, |
| | | |
| | | |
| | | // æå°ç©æ |
| | | async printWL(t2, t4, t5, t6, t7, t8) { |
| | | // å½åæ¶é´ |
| | | const time = new Date(); |
| | | const strTime = |
| | | `${time.getFullYear()}-${(time.getMonth() + 1).toString().padStart(2,'0')}-${(time.getDate()).toString().padStart(2,'0')} ${(time.getHours()).toString().padStart(2,'0')}:${time.getMinutes().toString().padStart(2,'0')}:${(time.getSeconds()).toString().padStart(2,'0')}`; |
| | | |
| | | const text1 = 'ç©ææ ç¾' |
| | | const text2 = t2 |
| | | const text3 = 'éè´è®¢åï¼' + this.cgdh |
| | | const text4 = 'å°è´§åå·ï¼' + t4 |
| | | const text5 = 'ç©æç¼ç ï¼' + t5 |
| | | const text6 = 'ç©æåç§°ï¼' + t6 |
| | | const text7 = 'è§æ ¼åå·ï¼' + t7 |
| | | const text8 = 'æ ç¾æ°éï¼' + t8 |
| | | const text9 = 'æä½äººåï¼' + uni.getStorageSync('username') |
| | | const text10 = 'æä½æ¶é´ï¼' + strTime |
| | | |
| | | // ç¬¬ä¸æ¥ï¼å
夿æå°æºæ¯å¦å·²ç»æå¼ |
| | | // 彿µè¯çº¸ä¸ºç«åæ¶ï¼æ¨ªå对åºå®½ï¼ç«å对åºé« |
| | | if (api.isPrinterOpened()) { |
| | | api.startJob({ |
| | | width: 78, |
| | | height: 80 |
| | | }); |
| | | |
| | | //æ é¢ |
| | | // æ é¢é¨ååç´å±
ä¸ï¼æ°´å¹³å±
ä¸ï¼åä½å¤§å°5mmï¼å ç²æ¾ç¤º |
| | | api.setItemHorizontalAlignment(1); |
| | | api.setItemVerticalAlignment(1); |
| | | api.drawText({ |
| | | text: text1, |
| | | x: 52, |
| | | y: 9, |
| | | // width: 50, |
| | | // height: 20, |
| | | fontHeight: 7, |
| | | fontStyle: 1 |
| | | }); |
| | | api.draw2DQRCode({ |
| | | text: text2, |
| | | x: 41, |
| | | y: 14, |
| | | width: 22, |
| | | eccLevel: 2, |
| | | horizontalAlignment: 1, |
| | | verticalAlignment: 1 |
| | | }); |
| | | api.drawText({ |
| | | text: text3, |
| | | x: 30, |
| | | y: 40, |
| | | fontHeight: 3.1, |
| | | fontStyle: 0, |
| | | horizontalAlignment: 0, |
| | | }); |
| | | api.drawText({ |
| | | text: text4, |
| | | x: 30, |
| | | y: 45, |
| | | fontHeight: 3.1, |
| | | fontStyle: 0, |
| | | horizontalAlignment: 0, |
| | | }); |
| | | api.drawText({ |
| | | text: text5, |
| | | x: 30, |
| | | y: 50, |
| | | fontHeight: 3.1, |
| | | fontStyle: 0, |
| | | horizontalAlignment: 0, |
| | | }); |
| | | api.drawText({ |
| | | text: text6, |
| | | x: 30, |
| | | y: 55, |
| | | fontHeight: 3.1, |
| | | horizontalAlignment: 0, |
| | | fontStyle: 0 |
| | | }); |
| | | api.drawText({ |
| | | text: text7, |
| | | x: 30, |
| | | y: 60, |
| | | fontHeight: 3.1, |
| | | horizontalAlignment: 0, |
| | | fontStyle: 0 |
| | | }); |
| | | api.drawText({ |
| | | text: text8, |
| | | x: 30, |
| | | y: 65, |
| | | fontHeight: 3.1, |
| | | horizontalAlignment: 0, |
| | | fontStyle: 0 |
| | | }); |
| | | api.drawText({ |
| | | text: text9, |
| | | x: 30, |
| | | y: 70, |
| | | fontHeight: 3.1, |
| | | horizontalAlignment: 0, |
| | | fontStyle: 0 |
| | | }); |
| | | api.drawText({ |
| | | text: text10, |
| | | x: 30, |
| | | y: 75, |
| | | fontHeight: 3.1, |
| | | horizontalAlignment: 0, |
| | | fontStyle: 0 |
| | | }); |
| | | // ç»å¶ç»æï¼å¼å§æäº¤æå° |
| | | api.commitJob(); |
| | | } |
| | | }, |
| | | // åå§åèçè®¾å¤ |
| | | openBluetoothAdapter() { |
| | | uni.openBluetoothAdapter({ |
| | | success: e => { |
| | | console.log('åå§åèçæå:' + e.errMsg); |
| | | console.log(JSON.stringify(e)); |
| | | this.getBluetoothAdapterState(); |
| | | }, |
| | | fail: e => { |
| | | console.log(e) |
| | | console.log('åå§åèç失败ï¼é误ç ï¼' + (e.errCode || e.errMsg)); |
| | | uni.showModal({ |
| | | title: 'æç¤ºï¼', |
| | | content: 'åå§åèç失败ï¼è¯·æå¼æ¬æºèçï¼', |
| | | confirmText: "ç¡®å®", |
| | | cancelText: "åæ¶", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.bluetoothSettings() |
| | | } |
| | | } |
| | | }); |
| | | if (e.errCode !== 0) { |
| | | //initTypes(e.errCode, e.errMsg); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // èªå¨è¿æ¥æå°æº |
| | | onPrinterChanged(e) { |
| | | console.log(e); |
| | | this.index = e ? e.target.value : 0; |
| | | this.printerName = this.printerList[this.index]; |
| | | }, |
| | | // è¿æ¥æå°æº |
| | | async openPrinter() { |
| | | this.isSuccess = false |
| | | console.log('æ§è¡äº1') |
| | | if (this.printerName) { |
| | | console.log('æ§è¡äº2') |
| | | this.isSuccess = true |
| | | this.keyGetTime = new Date().getTime() |
| | | // è¿æ¥æ°çæå°æº |
| | | api.openPrinter(this.printerName, (value) => { |
| | | if (value) { |
| | | modal.toast({ |
| | | message: "æå°æºè¿æ¥æå", |
| | | duration: 1.5, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | // this.openPrinter() |
| | | }, |
| | | // èç设置 |
| | | bluetoothSettings() { |
| | | var main = plus.android.runtimeMainActivity(); |
| | | var Intent = plus.android.importClass("android.content.Intent"); |
| | | var mIntent = new Intent('android.settings.BLUETOOTH_SETTINGS'); |
| | | main.startActivity(mIntent); |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | .arrowClass { |
| | | display: flex; |
| | | justify-content: center; |
| | | // background-color: #efefef; |
| | | width: 100rpx; |
| | | // border-radius: 10rpx; |
| | | height: 56rpx; |
| | | } |
| | | |
| | | .custominputClass { |
| | | width: 450rpx; |
| | | // height: 50rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: 3rpx #eff0f1 solid; |
| | | border-radius: 10rpx; |
| | | padding: 4rpx 16rpx; |
| | | |
| | | } |
| | | |
| | | .ellipsis { |
| | | text-overflow: ellipsis; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | padding: 12rpx 2rpx; |
| | | } |
| | | |
| | | .f_c_c { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | text-align: right; |
| | | margin-top: 10rpx; |
| | | border-bottom: 1px solid #eff0f1; |
| | | // line-height: 80rpx; |
| | | // height:70rpx; |
| | | } |
| | | |
| | | ::v-deep .uni-input-wrapper { |
| | | text-align: right; |
| | | } |
| | | |
| | | .numberBox { |
| | | ::v-deep .uni-input-wrapper { |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | |
| | | ::v-deep .u-number-box__minus { |
| | | height: 50rpx !important; |
| | | } |
| | | |
| | | ::v-deep .u-number-box__input { |
| | | height: 50rpx !important; |
| | | |
| | | } |
| | | |
| | | ::v-deep .u-number-box__plus { |
| | | height: 50rpx !important; |
| | | } |
| | | |
| | | ::v-deep .addClass .uicon-plus-circle { |
| | | font-size: 40rpx !important; |
| | | margin-right: 20rpx !important; |
| | | } |
| | | |
| | | ::v-deep .addClass .u-button__text { |
| | | font-size: 36rpx !important; |
| | | } |
| | | |
| | | ::v-deep .u-modal__content { |
| | | justify-content: flex-start; |
| | | } |
| | | |
| | | |
| | | .modelNumber { |
| | | ::v-deep .uni-input-input { |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .u-input--no-radius { |
| | | padding-bottom: 0 !important; |
| | | } |
| | | |
| | | .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: -22rpx 0 0 610rpx; |
| | | background-color: #d3daf9; |
| | | font-size: 26rpx; |
| | | padding: 6rpx 0 0 10rpx; |
| | | border-radius: 100%; |
| | | } |
| | | |
| | | ::v-deep .u-switch { |
| | | width: 300rpx !important; |
| | | height: 46rpx !important; |
| | | // margin-bottom: 8rpx !important; |
| | | line-height: 46rpx !important; |
| | | background-color: #EFF0F1 !important; |
| | | } |
| | | |
| | | // ::v-deep .u-switch__bg{ |
| | | // height: 46rpx !important; |
| | | // line-height: 46rpx !important; |
| | | // width: 100% !important; |
| | | // } |
| | | |
| | | ::v-deep .u-switch__node { |
| | | width: 150rpx !important; |
| | | // margin-bottom: 8rpx !important; |
| | | height: 46rpx !important; |
| | | line-height: 46rpx !important; |
| | | background-color: rgba(41, 121, 255, 0.8); |
| | | transform: translateX(0) !important; |
| | | |
| | | } |
| | | |
| | | ::v-deep .u-switch__node--on { |
| | | // width: 100rpx !important; |
| | | // width: 20px; |
| | | height: 46rpx !important; |
| | | line-height: 46rpx !important; |
| | | // margin-bottom: 8rpx !important; |
| | | // height: 20px; |
| | | transform: translateX(-150rpx) !important; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="è¿å·¥é¢æ"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="åºåçç¹"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="å
¶å®åºåº"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="å
¶å®é¢æ"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="å
¶å®å
¥åº"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="ç产åºåº"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="çäº§é¢æ"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="ç产å
¥åº" :topRightMessageCount="topRightMessageCount"></page-nav> |
| | | |
| | | |
| | | <div class="sacnBody" v-if="contentArr.length===0"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æåæ®æ¡ç </div> |
| | | </div> |
| | | |
| | | |
| | | <view v-if="contentArr.length!==0" class="mainContent" :style="{maxHeight: '1340rpx',overflow: 'scroll'}"> |
| | | |
| | | <view class="head"> |
| | | <view style="padding:20rpx 20rpx 20rpx 30rpx;"> |
| | | <view class="marginBottom20 flex_column" style="width: 100%;" |
| | | @click="radioValueClick(item.inbarcode)" v-for="(item,index) in contentArr" |
| | | :key="item.inbarcode"> |
| | | |
| | | <view class="orderNumber" :key="item.inbarcode"> |
| | | {{(index+1).toString().padStart(2,0)}} |
| | | </view> |
| | | |
| | | <view class="trash" @click="trashClick(index)" v-show="contentArr.length>1"> |
| | | <u-icon name="trash" size='40'></u-icon> |
| | | </view> |
| | | <!-- |
| | | <view v-show="contentArr.length===1" style="width: 48rpx;height: 48rpx;"> |
| | | </view> --> |
| | | |
| | | |
| | | <view class="flex_between marginBottom20"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view style="font-weight: bold;margin-left: -20rpx;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="color: rgba(0, 0, 0, 0.9);"> |
| | | æ¡ç ä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view>æ¡ç ç¼å·ï¼</view> |
| | | <view>ç©æç¼ç ï¼</view> |
| | | <view>ç©æåç§°ï¼</view> |
| | | <view>ç©æè§æ ¼ï¼</view> |
| | | <view>ç©ææ°éï¼</view> |
| | | <view>{{item.mpoid?'æºååå·':'å·¥åç¼å·'}}</view> |
| | | <view>æä½æ¶é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view style="opacity: 0;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | æ¡ç ä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view>{{item.inbarcode}}</view> |
| | | <view>{{item.partcode}}</view> |
| | | <view>{{item.partname}}</view> |
| | | <view>{{item.partspec?item.partspec:'/'}}</view> |
| | | <view>{{item.good_qty}}</view> |
| | | <view>{{item.wo_code}}</view> |
| | | <view>{{item.lm_date}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- <u-radio size='40' :key="item.partcode" :name="item.partcode" activeColor="red"></u-radio> --> |
| | | </view> |
| | | |
| | | <u-gap v-if="index!==contentArr.length-1" height="10" style="width: 110%;margin-left: -5%;" |
| | | bgColor="#eff0f1"></u-gap> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | |
| | | <u-gap height="20" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head"> |
| | | <view class="head_block"> |
| | | <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="stockCodeScanClick" color="red" size="56"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view style="display:flex;justify-content: space-between; margin: 20rpx;"> |
| | | <view class="titleFont"> |
| | | ä»åºä¿¡æ¯ |
| | | </view> |
| | | |
| | | <view class="contentFont"> |
| | | {{stockcode===''?'å¾
æ«æ':stockcodeArr.find(i=>i.code===stockcode).name}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-button v-if="contentArr.length!==0" size="large" :disabled="stockcode===''" :loading="isDisabledSubmitButton" |
| | | loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" @click="submit" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | <!-- æ¬æµ®ç --> |
| | | <view v-if="contentArr.length!==0" @click="topScanClick"> |
| | | <drag-ball :x='$DeviceInformation.screenWidth*0.8' :y="$DeviceInformation.screenHeight*0.7"></drag-ball> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | NewOrderCodeSearch, |
| | | ErpWarehouseSelect, |
| | | ErpUserSelect, |
| | | ErpWkshopDepartmentSelect, |
| | | MesAppProductInHouseOrderBarCodeSearch, |
| | | MesAppProductInHouseOrderBarCodeSave |
| | | } from '../../config/api.js'; |
| | | import Vue from 'vue' |
| | | const App = getApp() |
| | | export default { |
| | | onLoad(option) { |
| | | App.watch(this.getTopRightMessageCountIsChange, 'topRightMessageCountIsChange') |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | topRightMessageCount: '', |
| | | |
| | | isDisabledSubmitButton: false, |
| | | contentArr: [{ |
| | | "inbarcode": "IN23061286", |
| | | "saleOrderid": 1, |
| | | "saleOrderCode": "SO-2023-06-0001", |
| | | "saleOrderDetailId": 2, |
| | | "mpoid": 1, |
| | | "m_po": "MO-2023-06-0001", |
| | | "sbid": 2, |
| | | "wo_id": 1034, |
| | | "wo_code": "MO-2023-06-0001_1", |
| | | "materiel_id": 11, |
| | | "partcode": "301", |
| | | "partname": "çµè", |
| | | "partspec": "", |
| | | "unitid": 6, |
| | | "unitcode": "6", |
| | | "unitname": "å°", |
| | | "step_code": "Step08", |
| | | "wkshp_id": 9, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": 300, |
| | | "qty": 300, |
| | | "plan_qty": 300, |
| | | "good_qty": 297, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 297, |
| | | "lm_date": "2023-06-12 16:51:02", |
| | | "style": "S" |
| | | }, { |
| | | "inbarcode": "IN23061285", |
| | | "saleOrderid": null, |
| | | "saleOrderCode": "", |
| | | "saleOrderDetailId": null, |
| | | "mpoid": null, |
| | | "m_po": "", |
| | | "sbid": null, |
| | | "wo_id": 1037, |
| | | "wo_code": "SGPO20230609_2", |
| | | "materiel_id": null, |
| | | "partcode": "03001", |
| | | "partname": "æ¡å", |
| | | "partspec": "", |
| | | "unitid": null, |
| | | "unitcode": null, |
| | | "unitname": null, |
| | | "step_code": "Step03", |
| | | "wkshp_id": null, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": null, |
| | | "qty": null, |
| | | "plan_qty": 900, |
| | | "good_qty": 15, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 15, |
| | | "lm_date": "2023-06-12 16:50:37", |
| | | "style": "B" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061284", |
| | | "saleOrderid": null, |
| | | "saleOrderCode": "", |
| | | "saleOrderDetailId": null, |
| | | "mpoid": null, |
| | | "m_po": "", |
| | | "sbid": null, |
| | | "wo_id": 1037, |
| | | "wo_code": "SGPO20230609_2", |
| | | "materiel_id": null, |
| | | "partcode": "03001", |
| | | "partname": "æ¡å", |
| | | "partspec": "", |
| | | "unitid": null, |
| | | "unitcode": null, |
| | | "unitname": null, |
| | | "step_code": "Step03", |
| | | "wkshp_id": null, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": null, |
| | | "qty": null, |
| | | "plan_qty": 900, |
| | | "good_qty": 10, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 10, |
| | | "lm_date": "2023-06-12 16:50:23", |
| | | "style": "B" |
| | | }, { |
| | | "inbarcode": "IN23060969", |
| | | "saleOrderid": 1, |
| | | "saleOrderCode": "SO-2023-06-0001", |
| | | "saleOrderDetailId": 1, |
| | | "mpoid": 1, |
| | | "m_po": "MO-2023-06-0001", |
| | | "sbid": 1, |
| | | "wo_id": 1035, |
| | | "wo_code": "MO-2023-06-0001_2", |
| | | "materiel_id": 32, |
| | | "partcode": "03001", |
| | | "partname": "æ¡å", |
| | | "partspec": "", |
| | | "unitid": 1, |
| | | "unitcode": "1", |
| | | "unitname": "PCS", |
| | | "step_code": "Step03", |
| | | "wkshp_id": 9, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": 100, |
| | | "qty": 100, |
| | | "plan_qty": 100, |
| | | "good_qty": 1, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 1, |
| | | "lm_date": "2023-06-09 08:27:09", |
| | | "style": "B" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061388", |
| | | "saleOrderid": null, |
| | | "saleOrderCode": "", |
| | | "saleOrderDetailId": null, |
| | | "mpoid": null, |
| | | "m_po": "", |
| | | "sbid": null, |
| | | "wo_id": 1039, |
| | | "wo_code": "SGPO20230613_3", |
| | | "materiel_id": null, |
| | | "partcode": "303", |
| | | "partname": "8703æ å·æ 绳çµé¯", |
| | | "partspec": "", |
| | | "unitid": null, |
| | | "unitcode": null, |
| | | "unitname": null, |
| | | "step_code": "Step03", |
| | | "wkshp_id": null, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": null, |
| | | "qty": null, |
| | | "plan_qty": 500, |
| | | "good_qty": 1, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 1, |
| | | "lm_date": "2023-06-13 09:00:08", |
| | | "style": "B" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061389", |
| | | "saleOrderid": null, |
| | | "saleOrderCode": "", |
| | | "saleOrderDetailId": null, |
| | | "mpoid": null, |
| | | "m_po": "", |
| | | "sbid": null, |
| | | "wo_id": 1039, |
| | | "wo_code": "SGPO20230613_3", |
| | | "materiel_id": null, |
| | | "partcode": "303", |
| | | "partname": "8703æ å·æ 绳çµé¯", |
| | | "partspec": "", |
| | | "unitid": null, |
| | | "unitcode": null, |
| | | "unitname": null, |
| | | "step_code": "Step03", |
| | | "wkshp_id": null, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": null, |
| | | "qty": null, |
| | | "plan_qty": 500, |
| | | "good_qty": 2, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 2, |
| | | "lm_date": "2023-06-13 09:01:15", |
| | | "style": "B" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061390", |
| | | "saleOrderid": null, |
| | | "saleOrderCode": "", |
| | | "saleOrderDetailId": null, |
| | | "mpoid": 3, |
| | | "m_po": "MO-2023-06-0003", |
| | | "sbid": 4, |
| | | "wo_id": 1044, |
| | | "wo_code": "MO-2023-06-0003_1", |
| | | "materiel_id": 11, |
| | | "partcode": "301", |
| | | "partname": "çµè", |
| | | "partspec": "", |
| | | "unitid": 6, |
| | | "unitcode": "6", |
| | | "unitname": "å°", |
| | | "step_code": "Step08", |
| | | "wkshp_id": 9, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": null, |
| | | "qty": 10, |
| | | "plan_qty": 10, |
| | | "good_qty": 5, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 5, |
| | | "lm_date": "2023-06-13 09:14:09", |
| | | "style": "S" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061391", |
| | | "saleOrderid": null, |
| | | "saleOrderCode": "", |
| | | "saleOrderDetailId": null, |
| | | "mpoid": 3, |
| | | "m_po": "MO-2023-06-0003", |
| | | "sbid": 4, |
| | | "wo_id": 1044, |
| | | "wo_code": "MO-2023-06-0003_1", |
| | | "materiel_id": 11, |
| | | "partcode": "301", |
| | | "partname": "çµè", |
| | | "partspec": "", |
| | | "unitid": 6, |
| | | "unitcode": "6", |
| | | "unitname": "å°", |
| | | "step_code": "Step08", |
| | | "wkshp_id": 9, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": null, |
| | | "qty": 10, |
| | | "plan_qty": 10, |
| | | "good_qty": 2, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 2, |
| | | "lm_date": "2023-06-13 09:14:19", |
| | | "style": "S" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061392", |
| | | "saleOrderid": 5, |
| | | "saleOrderCode": "SO-2023-06-0004", |
| | | "saleOrderDetailId": 7, |
| | | "mpoid": 5, |
| | | "m_po": "MO-2023-06-0005", |
| | | "sbid": 9, |
| | | "wo_id": 1042, |
| | | "wo_code": "MO-2023-06-0005_3", |
| | | "materiel_id": 32, |
| | | "partcode": "03001", |
| | | "partname": "æ¡å", |
| | | "partspec": "", |
| | | "unitid": 1, |
| | | "unitcode": "1", |
| | | "unitname": "PCS", |
| | | "step_code": "Step03", |
| | | "wkshp_id": 9, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": 130, |
| | | "qty": 130, |
| | | "plan_qty": 65, |
| | | "good_qty": 6, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 6, |
| | | "lm_date": "2023-06-13 09:15:37", |
| | | "style": "B" |
| | | }, |
| | | { |
| | | "inbarcode": "IN23061393", |
| | | "saleOrderid": 5, |
| | | "saleOrderCode": "SO-2023-06-0004", |
| | | "saleOrderDetailId": 7, |
| | | "mpoid": 5, |
| | | "m_po": "MO-2023-06-0005", |
| | | "sbid": 9, |
| | | "wo_id": 1042, |
| | | "wo_code": "MO-2023-06-0005_3", |
| | | "materiel_id": 32, |
| | | "partcode": "03001", |
| | | "partname": "æ¡å", |
| | | "partspec": "", |
| | | "unitid": 1, |
| | | "unitcode": "1", |
| | | "unitname": "PCS", |
| | | "step_code": "Step03", |
| | | "wkshp_id": 9, |
| | | "wkshp_code": "CJ001", |
| | | "stck_id": null, |
| | | "stockcode": null, |
| | | "stockname": null, |
| | | "saleOrderqty": 130, |
| | | "qty": 130, |
| | | "plan_qty": 65, |
| | | "good_qty": 7, |
| | | "inhouseqty": 0, |
| | | "stinhouseqty": 7, |
| | | "lm_date": "2023-06-13 09:15:49", |
| | | "style": "B" |
| | | } |
| | | |
| | | |
| | | |
| | | ], //å
容æ°ç» |
| | | stockcode: '03', //ä»åºä¿¡æ¯ |
| | | stockcodeArr: [], //ä»åºä¿¡æ¯æ°ç» |
| | | userArr: [], //ç¨æ·æ°ç» |
| | | departmentArr: [], //é¨é¨æ°ç» |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | // this.getMesAppProductInHouseOrderBarCodeSearch('IN23060981') |
| | | |
| | | // this.global.getTPlusToken() |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | this.topRightMessageCount = uni.getStorageSync('topRightMessageCount') |
| | | |
| | | |
| | | this.getErpWarehouseSelect() //è·åç产ä»åºä¿¡æ¯æ°ç» |
| | | // this.getErpUserSelect() //è·å人å |
| | | // this.getErpWkshopDepartmentSelect() //è·åé¨é¨ä¿¡æ¯ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | // è·åå®ç¯æ¶æ¯å表é¿åº¦ |
| | | getTopRightMessageCountIsChange(val) { |
| | | this.topRightMessageCount = val |
| | | }, |
| | | |
| | | async getErpWkshopDepartmentSelect() { |
| | | const res = await ErpWkshopDepartmentSelect() |
| | | this.departmentArr = res.data |
| | | }, |
| | | |
| | | async getErpUserSelect() { |
| | | const res = await ErpUserSelect() |
| | | this.userArr = res.data |
| | | }, |
| | | |
| | | async getErpWarehouseSelect() { |
| | | const res = await ErpWarehouseSelect() |
| | | this.stockcodeArr = res.data |
| | | }, |
| | | |
| | | async getMesAppProductInHouseOrderBarCodeSearch(labcode) { |
| | | const data = { |
| | | labcode |
| | | } |
| | | const res = await MesAppProductInHouseOrderBarCodeSearch(this.global.formatData(data)) |
| | | // this.contentArr = res.data ? res.data : [] |
| | | |
| | | this.contentArr.push(res.data[0]) |
| | | }, |
| | | |
| | | // æ«åæ®æ¡ç |
| | | 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.getMesAppProductInHouseOrderBarCodeSearch(res.result) |
| | | |
| | | if (that.contentArr.find(i => i.inbarcode === res.result)) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getMesAppProductInHouseOrderBarCodeSearch(res.result); |
| | | } |
| | | |
| | | |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // ä»åºä¿¡æ¯æ«æ |
| | | stockCodeScanClick() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // scanType: ['barCode', 'qrCode'], |
| | | scanType: ['qrCode'], |
| | | success: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.stockcode = res.result |
| | | if (!that.stockcodeArr.find(i => i.code === res.result)) { |
| | | that.$u.toast('æ æä»åºç ï¼') |
| | | } |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // å é¤äºä»¶ç¹å» |
| | | trashClick(val) { |
| | | this.contentArr.splice(val, 1) |
| | | }, |
| | | |
| | | async submit() { |
| | | console.log(this.contentArr) |
| | | console.log(JSON.parse(JSON.stringify(this.contentArr))) |
| | | |
| | | |
| | | // å
åææºåãæ æºå |
| | | //ææºåçéè¿æºåå·ã产ååå¹¶ |
| | | //æ æºåçéè¿å·¥åå·ã产ååå¹¶ |
| | | |
| | | // ææºå |
| | | let temp1 = this.contentArr.filter(i => i.m_po) |
| | | // æ æºå |
| | | let temp2 = this.contentArr.filter(i => !i.m_po) |
| | | |
| | | console.log(temp1, temp2, 1) |
| | | |
| | | |
| | | let m_poArr = [...new Set(temp1.map(i => i.m_po))] |
| | | console.log(m_poArr, 2) |
| | | |
| | | |
| | | let array1 = [] |
| | | |
| | | m_poArr.forEach(i => { |
| | | let array2 = [] |
| | | const t1 = temp1.filter(m => m.m_po === i) |
| | | // å
æ¾å°è¿ä¸ªæºåä¸ç产å è¥äº§åç¸ååè¿è¡åå¹¶ |
| | | t1.forEach(m => { |
| | | let array3 = [] |
| | | const partcodeArr = [...new Set(t1.map(j => j.partcode))] |
| | | |
| | | partcodeArr.forEach(k => { |
| | | const t = t1.find(j => j.partcode === k) |
| | | let sum = 0 |
| | | const good_qty = t1.filter(j => j.partcode === k).map(j => |
| | | parseFloat(j.good_qty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | sum = 0 |
| | | const inhouseqty = t1.filter(j => j.partcode === k).map(j => |
| | | parseFloat(j.inhouseqty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | sum = 0 |
| | | const stinhouseqty = t1.filter(j => j.partcode === k).map(j => |
| | | parseFloat(j.stinhouseqty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | |
| | | array3.push({ |
| | | stockcode: this.stockcode, |
| | | partcode: t.partcode, |
| | | partname: t.partname, |
| | | partspec: t.partspec, |
| | | qty: t.qty, |
| | | good_qty, |
| | | inhouseqty, |
| | | stinhouseqty, |
| | | unitid: t.unitid, |
| | | unitname: t.unitname, |
| | | sourceVoucherDetailId: t.sbid, |
| | | saleOrderDetailId: t.saleOrderDetailId, |
| | | ManufactureOrderDetailId: t.sbid, |
| | | stck_id: '', |
| | | SourceVoucherDetailIdByMergedFlow: t.sbid, |
| | | materiel_code: t.partcode, |
| | | warehouse: t.stockcode, |
| | | materiel_id: t.materiel_id |
| | | }) |
| | | }) |
| | | array2.push(array3) |
| | | }) |
| | | array1.push(array2) |
| | | }) |
| | | |
| | | console.log(array1, 12) |
| | | console.log(array1.flat(3), 13) |
| | | |
| | | //ååé»è¾ |
| | | |
| | | // let partcode2 = temp2.map(i => i.) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | async submit2() { |
| | | console.log('ææ¯æå
æ§è¡ï¼') |
| | | this.isDisabledSubmitButton = true |
| | | const openToken = await this.global.getTPlusToken() |
| | | console.log(openToken) |
| | | console.log('ææ¯æåæ§è¡ï¼') |
| | | |
| | | const { |
| | | data: r1 |
| | | } = await NewOrderCodeSearch(this.global.formatData({ |
| | | rightcode: '2064' |
| | | })) |
| | | |
| | | const headers = { |
| | | 'openToken': openToken, |
| | | 'appKey': Vue.prototype.$AppKey, |
| | | 'appSecret': Vue.prototype.$AppSecret, |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | |
| | | const partcodeArr = [...new Set(this.contentArr.map(i => i.partcode))] // æ°ç»å»é |
| | | let tableDataSummary = [] |
| | | partcodeArr.forEach(i => { |
| | | const t = this.contentArr.find(j => j.partcode === i) |
| | | let sum = 0 |
| | | const good_qty = this.contentArr.filter(j => j.partcode === i).map(j => |
| | | parseFloat( |
| | | j |
| | | .good_qty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | sum = 0 |
| | | const inhouseqty = this.contentArr.filter(j => j.partcode === i).map( |
| | | j => |
| | | parseFloat(j |
| | | .inhouseqty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | sum = 0 |
| | | const stinhouseqty = this.contentArr.filter(j => j.partcode === i).map( |
| | | j => |
| | | parseFloat(j |
| | | .stinhouseqty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | |
| | | tableDataSummary.push({ |
| | | stockcode: this.stockcode, |
| | | partcode: t.partcode, |
| | | partname: t.partname, |
| | | partspec: t.partspec, |
| | | qty: t.qty, |
| | | good_qty, |
| | | inhouseqty, |
| | | stinhouseqty, |
| | | unitid: t.unitid, |
| | | unitname: t.unitname, |
| | | sourceVoucherDetailId: t.sbid, |
| | | saleOrderDetailId: t.saleOrderDetailId, |
| | | ManufactureOrderDetailId: t.sbid, |
| | | stck_id: this.stockcode ? this.stockcodeArr.find(i => i |
| | | .code === this.stockcode).id : '', |
| | | SourceVoucherDetailIdByMergedFlow: t.sbid, |
| | | materiel_code: t.partcode, |
| | | warehouse: this.stockcode, |
| | | materiel_id: t.materiel_id |
| | | }) |
| | | }) |
| | | |
| | | // å½flag为nullæ¶ ä¸ºæ æºå åä¹ ä¸ºææºå |
| | | let flag = this.contentArr[0].mpoid === null |
| | | |
| | | |
| | | // æ æºå |
| | | if (flag) { |
| | | const RDRecordDetails = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | RDRecordDetails.push({ |
| | | Code: index + 1, // è¡å·ï¼ä»1å¼å§èªå¢é¿ |
| | | Inventory: { |
| | | Code: i.materiel_code // åè´§ç¼ç |
| | | }, |
| | | BaseQuantity: i.stinhouseqty, // 主计éå使°é |
| | | SNObject: { |
| | | SnAccountDetails: [{ |
| | | SNCode: index.toString().padStart(4, |
| | | '0') |
| | | }] |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | const data = { |
| | | 'dto': { |
| | | 'IsModifiedCode': true, |
| | | 'ExternalCode': r1[0], |
| | | 'Code': r1[0], |
| | | 'VoucherType': { |
| | | 'Code': 'ST1002' |
| | | }, |
| | | 'VoucherDate': this.global.handleDatetime(new Date().getTime()), |
| | | 'BusiType': { |
| | | 'Code': '03' |
| | | }, |
| | | 'Warehouse': { |
| | | 'Code': this.stockcode |
| | | }, |
| | | 'Department': { |
| | | 'Code': this.contentArr[0].wkshp_code, |
| | | // 'Name': this.stockcodeArr.find(i => i.code === this.stockcode) |
| | | // .name |
| | | }, |
| | | 'RDRecordDetails': RDRecordDetails |
| | | } |
| | | } |
| | | |
| | | |
| | | await new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: Vue.prototype.$chanjetBaseUrl + |
| | | '/tplus/api/v2/productReceive/Create', |
| | | data: data, |
| | | method: 'POST', |
| | | header: headers, |
| | | success: (r2) => { |
| | | |
| | | if (r2.data === null) { |
| | | // this.contentArr.forEach(i => { |
| | | // i.stockcode = this.stockcode |
| | | // i.stockname = this.stockcodeArr.find(j => j.code === |
| | | // this.stockcode).name |
| | | // i.id = this.stockcodeArr.find(j => j |
| | | // .code === this.stockcode).id |
| | | // }) |
| | | |
| | | |
| | | const head = { |
| | | rightcode: '2064', |
| | | hbillno: r1[0], |
| | | incbit: r1[1], |
| | | wkshpcode: this.contentArr[0] |
| | | .wkshp_code, |
| | | sourceVoucherId: !flag ? this |
| | | .contentArr[0] |
| | | .mpoid : this |
| | | .contentArr[0].wo_id, |
| | | sourceVoucherCode: !flag ? this |
| | | .contentArr[0] |
| | | .m_po : this |
| | | .contentArr[0].wo_code, |
| | | saleOrderId: this.contentArr[0] |
| | | .saleOrderid, |
| | | saleOrderCode: this.contentArr[0] |
| | | .saleOrderCode, |
| | | rdDirectionFlag: 1, |
| | | // makerid: this.userArr.find(i => i.name === uni |
| | | // .getStorageSync( |
| | | // 'username')).id, |
| | | makerid: '', |
| | | maker: uni.getStorageSync( |
| | | 'username'), |
| | | accountingyear: new Date() |
| | | .getFullYear(), |
| | | VoucherYear: new Date() |
| | | .getFullYear(), |
| | | VoucherPeriod: new Date() |
| | | .getMonth() + 1, |
| | | ManufactureOrderCode: !flag ? this |
| | | .contentArr[ |
| | | 0].m_po : this |
| | | .contentArr[0].wo_code, |
| | | idbusitype: '03', |
| | | iddepartment: '', |
| | | idrdstyle: 21, |
| | | idwarehouse: '', |
| | | voucherState: 181, |
| | | idvouchertype: 15, |
| | | voucherdate: this.global |
| | | .handleDatetime( |
| | | new Date() |
| | | .getTime()), |
| | | madedate: this.global |
| | | .handleDatetime(new Date() |
| | | .getTime()), |
| | | createdtime: this.global |
| | | .handleDatetime2( |
| | | new Date() |
| | | .getTime()), |
| | | DataSource: '56133', |
| | | idsourcevouchertype: 69 |
| | | } |
| | | |
| | | const subsum = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | subsum.push({ |
| | | code: index |
| | | .toString() |
| | | .padStart(4, |
| | | '0'), |
| | | rownumber: index + |
| | | 1, |
| | | arrivalQuantity: i |
| | | .qty, |
| | | quantity: i |
| | | .stinhouseqty, |
| | | compositionQuantity: i |
| | | .stinhouseqty + |
| | | i |
| | | .unitname, |
| | | baseQuantity: i |
| | | .stinhouseqty, |
| | | sourceVoucherId: ! |
| | | flag ? this |
| | | .contentArr[ |
| | | 0].mpoid : '', |
| | | sourceVoucherCode: '', |
| | | sourceVoucherDetailId: i |
| | | .sourceVoucherDetailId, |
| | | idsourcevouchertype: 69, |
| | | saleOrderId: this |
| | | .contentArr[0] |
| | | .saleOrderid, |
| | | saleOrderCode: this |
| | | .contentArr[ |
| | | 0] |
| | | .saleOrderCode, |
| | | saleOrderDetailId: i |
| | | .saleOrderDetailId, |
| | | ManufactureOrderId: |
| | | !flag ? |
| | | this |
| | | .contentArr[0] |
| | | .mpoid : '', |
| | | ManufactureOrderCode: |
| | | !flag ? |
| | | this |
| | | .contentArr[0] |
| | | .m_po : this |
| | | .contentArr[ |
| | | 0] |
| | | .wo_code, |
| | | ManufactureOrderDetailId: i |
| | | .ManufactureOrderDetailId, |
| | | idbusiTypeByMergedFlow: 3, |
| | | idinventory: i |
| | | .materiel_id, |
| | | idbaseunit: i |
| | | .unitid, |
| | | idunit: i.unitid, |
| | | idwarehouse: i |
| | | .stck_id, |
| | | SourceVoucherIdByMergedFlow: this |
| | | .contentArr[0] |
| | | .mpoid, |
| | | SourceVoucherCodeByMergedFlow: this |
| | | .contentArr[0] |
| | | .m_po, |
| | | SourceVoucherDetailIdByMergedFlow: i |
| | | .SourceVoucherDetailIdByMergedFlow, |
| | | idsourceVoucherTypeByMergedFlow: 69, |
| | | createdtime: this |
| | | .global |
| | | .handleDatetime2( |
| | | new Date() |
| | | .getTime() |
| | | ), |
| | | DataSource: '56133', |
| | | materiel_code: i |
| | | .materiel_code, |
| | | warehouse: i |
| | | .warehouse |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | head, |
| | | sub: this.contentArr, |
| | | subsum |
| | | } |
| | | |
| | | MesAppProductInHouseOrderBarCodeSave(this |
| | | .global.formatData({ |
| | | username: uni.getStorageSync('username') |
| | | }), data).then(r3 => { |
| | | if (r3.code === '200') { |
| | | this.$u.toast('å
¥åºæåï¼') |
| | | this.stockcode = '' |
| | | this.contentArr = [] |
| | | this.isDisabledSubmitButton = false |
| | | } else { |
| | | this.$u.toast('å
¥åºå¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // ææºå |
| | | if (!flag) { |
| | | const RDRecordDetails = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | RDRecordDetails.push({ |
| | | Code: index + 1, // è¡å·ï¼ä»1å¼å§èªå¢é¿ |
| | | SourceVoucherId: this.contentArr[0].mpoid, // æ¥æºåæ®çåæ®ID |
| | | BaseQuantity: i.stinhouseqty, // 主计éå使°é |
| | | SourceVoucherDetailId: i |
| | | .sourceVoucherDetailId, // æ¥æºåæ®çå¯¹åºæç»ID |
| | | Inventory: { |
| | | Code: i.materiel_code // åè´§ç¼ç |
| | | }, |
| | | IdSourceVoucherType: 69 |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | 'dto': { |
| | | 'Warehouse': { |
| | | 'Code': this.stockcode // ä»åºç¼ç |
| | | }, |
| | | 'Code': r1[0], // åæ®ç¼ç |
| | | 'IsModifiedCode': true, |
| | | 'BusiType': { |
| | | 'Code': '03' // ä¸å¡ç±»åç¼ç |
| | | }, |
| | | 'Department': { |
| | | 'Code': this.contentArr[0].wkshp_code // é¨é¨ç¼ç |
| | | }, |
| | | 'VoucherDate': this.global.handleDatetime(new Date() |
| | | .getTime()), // åæ®æ¥æ |
| | | 'RdStyle': { |
| | | 'Code': '21' // åºåºç±»å«ç¼ç |
| | | }, |
| | | 'RDRecordDetails': RDRecordDetails, |
| | | 'ExternalCode': r1[0], |
| | | 'VoucherType': { |
| | | 'Code': 'ST1002' |
| | | } |
| | | } |
| | | } |
| | | |
| | | await new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: Vue.prototype.$chanjetBaseUrl + |
| | | '/tplus/api/v2/ProductReceiveOpenApi/Create', |
| | | data: data, |
| | | method: 'POST', |
| | | header: headers, |
| | | success: (r2) => { |
| | | |
| | | if (r2.data.code === 0) { |
| | | this.contentArr.forEach(i => { |
| | | i.stockcode = this.stockcode |
| | | i.stockname = this.stockcodeArr.find(j => j |
| | | .code === |
| | | this.stockcode).name |
| | | i.id = this.stockcodeArr.find(j => j |
| | | .code === this |
| | | .stockcode).id |
| | | }) |
| | | |
| | | const head = { |
| | | rightcode: '2064', |
| | | hbillno: r1[0], |
| | | incbit: r1[1], |
| | | wkshpcode: this.contentArr[0].wkshp_code, |
| | | sourceVoucherId: !flag ? this.contentArr[0] |
| | | .mpoid : this |
| | | .contentArr[0].wo_id, |
| | | sourceVoucherCode: !flag ? this.contentArr[0] |
| | | .m_po : this |
| | | .contentArr[0].wo_code, |
| | | saleOrderId: this.contentArr[0].saleOrderid, |
| | | saleOrderCode: this.contentArr[0] |
| | | .saleOrderCode, |
| | | rdDirectionFlag: 1, |
| | | // makerid: this.userArr.find(i => i.name === uni |
| | | // .getStorageSync('username')).id, |
| | | makerid: '', |
| | | maker: uni.getStorageSync('username'), |
| | | accountingyear: new Date().getFullYear(), |
| | | VoucherYear: new Date().getFullYear(), |
| | | VoucherPeriod: new Date().getMonth() + 1, |
| | | ManufactureOrderCode: !flag ? this.contentArr[ |
| | | 0].m_po : this.contentArr[0] |
| | | .wo_code, |
| | | idbusitype: '03', |
| | | iddepartment: '', |
| | | idrdstyle: 21, |
| | | idwarehouse: '', |
| | | voucherState: 181, |
| | | idvouchertype: 15, |
| | | voucherdate: this.global.handleDatetime( |
| | | new Date() |
| | | .getTime()), |
| | | madedate: this.global.handleDatetime(new Date() |
| | | .getTime()), |
| | | createdtime: this.global.handleDatetime2( |
| | | new Date() |
| | | .getTime()), |
| | | DataSource: '56133', |
| | | idsourcevouchertype: 69 |
| | | } |
| | | |
| | | const subsum = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | subsum.push({ |
| | | code: index.toString() |
| | | .padStart(4, '0'), |
| | | rownumber: index + 1, |
| | | arrivalQuantity: i.qty, |
| | | quantity: i.stinhouseqty, |
| | | compositionQuantity: i |
| | | .stinhouseqty + i |
| | | .unitname, |
| | | baseQuantity: i.stinhouseqty, |
| | | sourceVoucherId: !flag ? this |
| | | .contentArr[ |
| | | 0].mpoid : '', |
| | | sourceVoucherCode: !flag ? this |
| | | .contentArr[ |
| | | 0].m_po : this |
| | | .contentArr[0].wo_code, |
| | | sourceVoucherDetailId: i |
| | | .sourceVoucherDetailId, |
| | | idsourcevouchertype: 69, |
| | | saleOrderId: this.contentArr[0] |
| | | .saleOrderid, |
| | | saleOrderCode: this.contentArr[ |
| | | 0] |
| | | .saleOrderCode, |
| | | saleOrderDetailId: i |
| | | .saleOrderDetailId, |
| | | ManufactureOrderId: !flag ? |
| | | this |
| | | .contentArr[0].mpoid : '', |
| | | ManufactureOrderCode: !flag ? |
| | | this |
| | | .contentArr[0].m_po : this |
| | | .contentArr[ |
| | | 0].wo_code, |
| | | ManufactureOrderDetailId: i |
| | | .ManufactureOrderDetailId, |
| | | idbusiTypeByMergedFlow: 3, |
| | | idinventory: i.materiel_id, |
| | | idbaseunit: i.unitid, |
| | | idunit: i.unitid, |
| | | idwarehouse: i.stck_id, |
| | | SourceVoucherIdByMergedFlow: this |
| | | .contentArr[0].mpoid, |
| | | SourceVoucherCodeByMergedFlow: this |
| | | .contentArr[0].m_po, |
| | | SourceVoucherDetailIdByMergedFlow: i |
| | | .SourceVoucherDetailIdByMergedFlow, |
| | | idsourceVoucherTypeByMergedFlow: 69, |
| | | createdtime: this.global |
| | | .handleDatetime2( |
| | | new Date().getTime()), |
| | | DataSource: '56133', |
| | | materiel_code: i.materiel_code, |
| | | warehouse: i.warehouse |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | head, |
| | | sub: this.contentArr, |
| | | subsum |
| | | } |
| | | |
| | | MesAppProductInHouseOrderBarCodeSave(this.global |
| | | .formatData({ |
| | | username: uni.getStorageSync( |
| | | 'username') |
| | | }), data).then(r3 => { |
| | | |
| | | if (r3.code === '200') { |
| | | this.$u.toast('å
¥åºæåï¼') |
| | | this.stockcode = '' |
| | | this.contentArr = [] |
| | | this.isDisabledSubmitButton = false |
| | | } else { |
| | | this.$u.toast('å
¥åºå¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | // æäº¤ |
| | | submit3() { |
| | | this.isDisabledSubmitButton = true |
| | | |
| | | NewOrderCodeSearch(this.global.formatData({ |
| | | rightcode: '2064' |
| | | })).then(r => { |
| | | let r1 = r.data |
| | | |
| | | console.log(r1, 'æ§è¡äº') |
| | | |
| | | const headers = { |
| | | 'openToken': uni.getStorageSync('openToken'), |
| | | 'appKey': Vue.prototype.$AppKey, |
| | | 'appSecret': Vue.prototype.$AppSecret, |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | |
| | | const partcodeArr = [...new Set(this.contentArr.map(i => i.partcode))] // æ°ç»å»é |
| | | let tableDataSummary = [] |
| | | partcodeArr.forEach(i => { |
| | | const t = this.contentArr.find(j => j.partcode === i) |
| | | let sum = 0 |
| | | const good_qty = this.contentArr.filter(j => j.partcode === i).map(j => |
| | | parseFloat( |
| | | j |
| | | .good_qty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | sum = 0 |
| | | const inhouseqty = this.contentArr.filter(j => j.partcode === i).map( |
| | | j => |
| | | parseFloat(j |
| | | .inhouseqty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | sum = 0 |
| | | const stinhouseqty = this.contentArr.filter(j => j.partcode === i).map( |
| | | j => |
| | | parseFloat(j |
| | | .stinhouseqty)).reduce((pre, curr) => { |
| | | sum = pre + curr |
| | | return sum |
| | | }) |
| | | |
| | | tableDataSummary.push({ |
| | | stockcode: this.stockcode, |
| | | partcode: t.partcode, |
| | | partname: t.partname, |
| | | partspec: t.partspec, |
| | | qty: t.qty, |
| | | good_qty, |
| | | inhouseqty, |
| | | stinhouseqty, |
| | | unitid: t.unitid, |
| | | unitname: t.unitname, |
| | | sourceVoucherDetailId: t.sbid, |
| | | saleOrderDetailId: t.saleOrderDetailId, |
| | | ManufactureOrderDetailId: t.sbid, |
| | | stck_id: this.stockcode ? this.stockcodeArr.find(i => i |
| | | .code === this.stockcode).id : '', |
| | | SourceVoucherDetailIdByMergedFlow: t.sbid, |
| | | materiel_code: t.partcode, |
| | | warehouse: this.stockcode, |
| | | materiel_id: t.materiel_id |
| | | }) |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | // å½flag为nullæ¶ ä¸ºæ æºå åä¹ ä¸ºææºå |
| | | let flag = this.contentArr[0].mpoid === null |
| | | |
| | | // æ æºå |
| | | if (flag) { |
| | | const RDRecordDetails = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | RDRecordDetails.push({ |
| | | Code: index + 1, // è¡å·ï¼ä»1å¼å§èªå¢é¿ |
| | | Inventory: { |
| | | Code: i.materiel_code // åè´§ç¼ç |
| | | }, |
| | | BaseQuantity: i.stinhouseqty, // 主计éå使°é |
| | | SNObject: { |
| | | SnAccountDetails: [{ |
| | | SNCode: index.toString().padStart(4, |
| | | '0') |
| | | }] |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | 'dto': { |
| | | 'IsModifiedCode': true, |
| | | 'ExternalCode': r1[0], |
| | | 'Code': r1[0], |
| | | 'VoucherType': { |
| | | 'Code': 'ST1002' |
| | | }, |
| | | 'VoucherDate': this.global.handleDatetime(new Date().getTime()), |
| | | 'BusiType': { |
| | | 'Code': '03' |
| | | }, |
| | | 'Warehouse': { |
| | | 'Code': this.stockcode |
| | | }, |
| | | 'Department': { |
| | | 'Code': this.contentArr[0].wkshp_code, |
| | | // 'Name': this.stockcodeArr.find(i => i.code === this.stockcode) |
| | | // .name |
| | | }, |
| | | 'RDRecordDetails': RDRecordDetails |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | console.log('æ§è¡äº') |
| | | console.log(data) |
| | | |
| | | new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: Vue.prototype.$chanjetBaseUrl + |
| | | '/tplus/api/v2/productReceive/Create', |
| | | data: data, |
| | | method: 'POST', |
| | | header: headers, |
| | | success: (r2) => { |
| | | console.log(r2, 'çèå') |
| | | if (r2.data === null) { |
| | | // this.contentArr.forEach(i => { |
| | | // i.stockcode = this.stockcode |
| | | // i.stockname = this.stockcodeArr.find(j => j.code === |
| | | // this.stockcode).name |
| | | // i.id = this.stockcodeArr.find(j => j |
| | | // .code === this.stockcode).id |
| | | // }) |
| | | |
| | | console.log(this.contentArr, 6) |
| | | |
| | | const head = { |
| | | rightcode: '2064', |
| | | hbillno: r1[0], |
| | | incbit: r1[1], |
| | | wkshpcode: this.contentArr[0] |
| | | .wkshp_code, |
| | | sourceVoucherId: !flag ? this |
| | | .contentArr[0] |
| | | .mpoid : this |
| | | .contentArr[0].wo_id, |
| | | sourceVoucherCode: !flag ? this |
| | | .contentArr[0] |
| | | .m_po : this |
| | | .contentArr[0].wo_code, |
| | | saleOrderId: this.contentArr[0] |
| | | .saleOrderid, |
| | | saleOrderCode: this.contentArr[0] |
| | | .saleOrderCode, |
| | | rdDirectionFlag: 1, |
| | | // makerid: this.userArr.find(i => i.name === uni |
| | | // .getStorageSync( |
| | | // 'username')).id, |
| | | makerid: '', |
| | | maker: uni.getStorageSync( |
| | | 'username'), |
| | | accountingyear: new Date() |
| | | .getFullYear(), |
| | | VoucherYear: new Date() |
| | | .getFullYear(), |
| | | VoucherPeriod: new Date() |
| | | .getMonth() + 1, |
| | | ManufactureOrderCode: !flag ? this |
| | | .contentArr[ |
| | | 0].m_po : this |
| | | .contentArr[0].wo_code, |
| | | idbusitype: '03', |
| | | iddepartment: '', |
| | | idrdstyle: 21, |
| | | idwarehouse: '', |
| | | voucherState: 181, |
| | | idvouchertype: 15, |
| | | voucherdate: this.global |
| | | .handleDatetime( |
| | | new Date() |
| | | .getTime()), |
| | | madedate: this.global |
| | | .handleDatetime(new Date() |
| | | .getTime()), |
| | | createdtime: this.global |
| | | .handleDatetime2( |
| | | new Date() |
| | | .getTime()), |
| | | DataSource: '56133', |
| | | idsourcevouchertype: 69 |
| | | } |
| | | |
| | | console.log(head, 'head') |
| | | const subsum = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | subsum.push({ |
| | | code: index |
| | | .toString() |
| | | .padStart(4, |
| | | '0'), |
| | | rownumber: index + |
| | | 1, |
| | | arrivalQuantity: i |
| | | .qty, |
| | | quantity: i |
| | | .stinhouseqty, |
| | | compositionQuantity: i |
| | | .stinhouseqty + |
| | | i |
| | | .unitname, |
| | | baseQuantity: i |
| | | .stinhouseqty, |
| | | sourceVoucherId: ! |
| | | flag ? this |
| | | .contentArr[ |
| | | 0].mpoid : '', |
| | | sourceVoucherCode: '', |
| | | sourceVoucherDetailId: i |
| | | .sourceVoucherDetailId, |
| | | idsourcevouchertype: 69, |
| | | saleOrderId: this |
| | | .contentArr[0] |
| | | .saleOrderid, |
| | | saleOrderCode: this |
| | | .contentArr[ |
| | | 0] |
| | | .saleOrderCode, |
| | | saleOrderDetailId: i |
| | | .saleOrderDetailId, |
| | | ManufactureOrderId: |
| | | !flag ? |
| | | this |
| | | .contentArr[0] |
| | | .mpoid : '', |
| | | ManufactureOrderCode: |
| | | !flag ? |
| | | this |
| | | .contentArr[0] |
| | | .m_po : this |
| | | .contentArr[ |
| | | 0] |
| | | .wo_code, |
| | | ManufactureOrderDetailId: i |
| | | .ManufactureOrderDetailId, |
| | | idbusiTypeByMergedFlow: 3, |
| | | idinventory: i |
| | | .materiel_id, |
| | | idbaseunit: i |
| | | .unitid, |
| | | idunit: i.unitid, |
| | | idwarehouse: i |
| | | .stck_id, |
| | | SourceVoucherIdByMergedFlow: this |
| | | .contentArr[0] |
| | | .mpoid, |
| | | SourceVoucherCodeByMergedFlow: this |
| | | .contentArr[0] |
| | | .m_po, |
| | | SourceVoucherDetailIdByMergedFlow: i |
| | | .SourceVoucherDetailIdByMergedFlow, |
| | | idsourceVoucherTypeByMergedFlow: 69, |
| | | createdtime: this |
| | | .global |
| | | .handleDatetime2( |
| | | new Date() |
| | | .getTime() |
| | | ), |
| | | DataSource: '56133', |
| | | materiel_code: i |
| | | .materiel_code, |
| | | warehouse: i |
| | | .warehouse |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | head, |
| | | sub: this.contentArr, |
| | | subsum |
| | | } |
| | | console.log(data, 'ç´¯äºå°äº', 2) |
| | | MesAppProductInHouseOrderBarCodeSave(this |
| | | .global |
| | | .formatData({ |
| | | username: uni |
| | | .getStorageSync( |
| | | 'username') |
| | | }), data).then(r3 => { |
| | | if (r3.code === '200') { |
| | | this.$u.toast('å
¥åºæåï¼') |
| | | this.stockcode = '' |
| | | this.contentArr = [] |
| | | this.isDisabledSubmitButton = |
| | | false |
| | | } else { |
| | | this.$u.toast('å
¥åºå¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = |
| | | false |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | resolve('success') |
| | | |
| | | }, |
| | | fail: (e) => { |
| | | console.log(e) |
| | | reject('e') |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | }) |
| | | |
| | | console.log('jiaduobao ') |
| | | } |
| | | |
| | | |
| | | |
| | | // ææºå |
| | | if (!flag) { |
| | | const RDRecordDetails = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | RDRecordDetails.push({ |
| | | Code: index + 1, // è¡å·ï¼ä»1å¼å§èªå¢é¿ |
| | | SourceVoucherId: this.contentArr[0].mpoid, // æ¥æºåæ®çåæ®ID |
| | | BaseQuantity: i.stinhouseqty, // 主计éå使°é |
| | | SourceVoucherDetailId: i |
| | | .sourceVoucherDetailId, // æ¥æºåæ®çå¯¹åºæç»ID |
| | | Inventory: { |
| | | Code: i.materiel_code // åè´§ç¼ç |
| | | }, |
| | | IdSourceVoucherType: 69 |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | 'dto': { |
| | | 'Warehouse': { |
| | | 'Code': this.stockcode // ä»åºç¼ç |
| | | }, |
| | | 'Code': r1[0], // åæ®ç¼ç |
| | | 'IsModifiedCode': true, |
| | | 'BusiType': { |
| | | 'Code': '03' // ä¸å¡ç±»åç¼ç |
| | | }, |
| | | 'Department': { |
| | | 'Code': this.contentArr[0].wkshp_code // é¨é¨ç¼ç |
| | | }, |
| | | 'VoucherDate': this.global.handleDatetime(new Date() |
| | | .getTime()), // åæ®æ¥æ |
| | | 'RdStyle': { |
| | | 'Code': '21' // åºåºç±»å«ç¼ç |
| | | }, |
| | | 'RDRecordDetails': RDRecordDetails, |
| | | 'ExternalCode': r1[0], |
| | | 'VoucherType': { |
| | | 'Code': 'ST1002' |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | console.log('æ§è¡äº') |
| | | console.log(data) |
| | | uni.request({ |
| | | url: Vue.prototype.$chanjetBaseUrl + |
| | | '/tplus/api/v2/ProductReceiveOpenApi/Create', |
| | | data: data, |
| | | method: 'POST', |
| | | header: headers, |
| | | success: (r2) => { |
| | | console.log(r2.data.code === 0, 34) |
| | | if (r2.data.code === 0) { |
| | | this.contentArr.forEach(i => { |
| | | i.stockcode = this.stockcode |
| | | i.stockname = this.stockcodeArr.find(j => j |
| | | .code === |
| | | this.stockcode).name |
| | | i.id = this.stockcodeArr.find(j => j |
| | | .code === this |
| | | .stockcode).id |
| | | }) |
| | | |
| | | const head = { |
| | | rightcode: '2064', |
| | | hbillno: r1[0], |
| | | incbit: r1[1], |
| | | wkshpcode: this.contentArr[0].wkshp_code, |
| | | sourceVoucherId: !flag ? this.contentArr[0] |
| | | .mpoid : this |
| | | .contentArr[0].wo_id, |
| | | sourceVoucherCode: !flag ? this.contentArr[0] |
| | | .m_po : this |
| | | .contentArr[0].wo_code, |
| | | saleOrderId: this.contentArr[0].saleOrderid, |
| | | saleOrderCode: this.contentArr[0] |
| | | .saleOrderCode, |
| | | rdDirectionFlag: 1, |
| | | // makerid: this.userArr.find(i => i.name === uni |
| | | // .getStorageSync('username')).id, |
| | | makerid: '', |
| | | maker: uni.getStorageSync('username'), |
| | | accountingyear: new Date().getFullYear(), |
| | | VoucherYear: new Date().getFullYear(), |
| | | VoucherPeriod: new Date().getMonth() + 1, |
| | | ManufactureOrderCode: !flag ? this.contentArr[ |
| | | 0].m_po : this.contentArr[0] |
| | | .wo_code, |
| | | idbusitype: '03', |
| | | iddepartment: '', |
| | | idrdstyle: 21, |
| | | idwarehouse: '', |
| | | voucherState: 181, |
| | | idvouchertype: 15, |
| | | voucherdate: this.global.handleDatetime( |
| | | new Date() |
| | | .getTime()), |
| | | madedate: this.global.handleDatetime(new Date() |
| | | .getTime()), |
| | | createdtime: this.global.handleDatetime2( |
| | | new Date() |
| | | .getTime()), |
| | | DataSource: '56133', |
| | | idsourcevouchertype: 69 |
| | | } |
| | | |
| | | const subsum = [] |
| | | tableDataSummary.forEach((i, index) => { |
| | | subsum.push({ |
| | | code: index.toString() |
| | | .padStart(4, '0'), |
| | | rownumber: index + 1, |
| | | arrivalQuantity: i.qty, |
| | | quantity: i.stinhouseqty, |
| | | compositionQuantity: i |
| | | .stinhouseqty + i |
| | | .unitname, |
| | | baseQuantity: i.stinhouseqty, |
| | | sourceVoucherId: !flag ? this |
| | | .contentArr[ |
| | | 0].mpoid : '', |
| | | sourceVoucherCode: !flag ? this |
| | | .contentArr[ |
| | | 0].m_po : this |
| | | .contentArr[0].wo_code, |
| | | sourceVoucherDetailId: i |
| | | .sourceVoucherDetailId, |
| | | idsourcevouchertype: 69, |
| | | saleOrderId: this.contentArr[0] |
| | | .saleOrderid, |
| | | saleOrderCode: this.contentArr[ |
| | | 0] |
| | | .saleOrderCode, |
| | | saleOrderDetailId: i |
| | | .saleOrderDetailId, |
| | | ManufactureOrderId: !flag ? |
| | | this |
| | | .contentArr[0].mpoid : '', |
| | | ManufactureOrderCode: !flag ? |
| | | this |
| | | .contentArr[0].m_po : this |
| | | .contentArr[ |
| | | 0].wo_code, |
| | | ManufactureOrderDetailId: i |
| | | .ManufactureOrderDetailId, |
| | | idbusiTypeByMergedFlow: 3, |
| | | idinventory: i.materiel_id, |
| | | idbaseunit: i.unitid, |
| | | idunit: i.unitid, |
| | | idwarehouse: i.stck_id, |
| | | SourceVoucherIdByMergedFlow: this |
| | | .contentArr[0].mpoid, |
| | | SourceVoucherCodeByMergedFlow: this |
| | | .contentArr[0].m_po, |
| | | SourceVoucherDetailIdByMergedFlow: i |
| | | .SourceVoucherDetailIdByMergedFlow, |
| | | idsourceVoucherTypeByMergedFlow: 69, |
| | | createdtime: this.global |
| | | .handleDatetime2( |
| | | new Date().getTime()), |
| | | DataSource: '56133', |
| | | materiel_code: i.materiel_code, |
| | | warehouse: i.warehouse |
| | | }) |
| | | }) |
| | | |
| | | const data = { |
| | | head, |
| | | sub: this.contentArr, |
| | | subsum |
| | | } |
| | | console.log(data, 35) |
| | | MesAppProductInHouseOrderBarCodeSave(this.global |
| | | .formatData({ |
| | | username: uni.getStorageSync( |
| | | 'username') |
| | | }), data).then(r3 => { |
| | | console.log(r3, 36) |
| | | if (r3.code === '200') { |
| | | this.$u.toast('å
¥åºæåï¼') |
| | | this.stockcode = '' |
| | | this.contentArr = [] |
| | | this.isDisabledSubmitButton = false |
| | | } else { |
| | | this.$u.toast('å
¥åºå¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | .orderNumber { |
| | | width: 60rpx; |
| | | height: 40rpx; |
| | | margin: -20rpx 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: -22rpx 0 0 610rpx; |
| | | background-color: #d3daf9; |
| | | font-size: 26rpx; |
| | | padding: 6rpx 0 0 10rpx; |
| | | border-radius: 100%; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="ç产éæ"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="ç©æè°æ¨"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="转æ¢å®¹å¨"></page-nav> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | // } from '../../config/api.js'; |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| | |
| | | |
| | | |
| | | // è´¨é管ç |
| | | case '2701': |
| | | url = 'zlgl/rcjy' //å
¥åæ£éª |
| | | break; |
| | | case '2702': |
| | | url = 'zlgl/sjjy' //馿£æ£éª |
| | | break; |
| | |
| | | case '2704': |
| | | url = 'zlgl/wgjy' //å®å·¥æ£éª |
| | | break; |
| | | |
| | | |
| | | |
| | | // 设å¤ç®¡ç |
| | |
| | | case '2104': |
| | | url = 'znfx/scjd' //ç产è¿åº¦ |
| | | break; |
| | | |
| | | |
| | | // ç©æç®¡ç |
| | | case '2600': |
| | | url = 'wlgl/cgdh' //éè´å°è´§ |
| | | break; |
| | | case '2601': |
| | | url = 'wlgl/cgrk' //éè´å
¥åº |
| | | break; |
| | | |
| | | } |
| | | this.popupShow = false //äºçº§èåçæ¾éæ§å¶ |
| | | console.log(url) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="å
¥åæ£éª"></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 class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | ç©æä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20" style="height: 210rpx;"> |
| | | <view class="marginBottom20" style="display: flex;"> |
| | | <!-- v-for="item in purchorderArr" --> |
| | | <view class="flex_column titleFont"> |
| | | <view>åæ®ç¼å·ï¼</view> |
| | | <view>ç©æç¼ç ï¼</view> |
| | | <view>ç©æåç§°ï¼</view> |
| | | <view>ç©æè§æ ¼ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{purchorderObj.hbillno}}</view> |
| | | <view>{{purchorderObj.partcode}}</view> |
| | | <view>{{purchorderObj.partname}}</view> |
| | | <view>{{purchorderObj.partspec?purchorderObj.partspec:'/'}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-gap height="20" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <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> |
| | | |
| | | |
| | | <u-button :disabled="!sheetValue" v-if='purchorderArr.length!==0' type="primary" size='large' :hairline="true" |
| | | @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | |
| | | <!-- <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 { |
| | | InFactoryCheckScanLabCode, |
| | | QualityScheme |
| | | } 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.getQualityScheme() |
| | | |
| | | |
| | | // this.getInFactoryCheckScanLabCode('DH2304041467') |
| | | }, |
| | | 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.getInFactoryCheckScanLabCode(that.scanContent); |
| | | } |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | // è·åæ ç¾ä¿¡æ¯ |
| | | async getInFactoryCheckScanLabCode(labcode) { |
| | | const data = { |
| | | labcode |
| | | } |
| | | const res = await InFactoryCheckScanLabCode(this.global.formatData(data)) |
| | | |
| | | if (res.code === '200') { |
| | | console.log(res) |
| | | this.purchorderArr.unshift({ |
| | | hbillno: res.data.labcont[0].hbillno, |
| | | partcode: res.data.labcont[0].partcode, |
| | | partname: res.data.labcont[0].partname, |
| | | partspec: res.data.labcont[0].partspec, |
| | | hbarcode: res.data.labcont[0].hbarcode, |
| | | hbatchno: res.data.labcont[0].hbatchno ? res.data.labcont[0].hbatchno : '/', |
| | | }) |
| | | |
| | | this.purchorderDetailArr.unshift({ |
| | | hbillno: res.data.labcont[0].hbillno, |
| | | partcode: res.data.labcont[0].partcode, |
| | | hbarcode: res.data.labcont[0].hbarcode, |
| | | hqty: res.data.labcont[0].hqty, |
| | | hcustomername: res.data.labcont[0].hcustomername, |
| | | hcustomercode: res.data.labcont[0].hcustomercode, |
| | | hbatchno: res.data.labcont[0].hbatchno ? res.data.labcont[0].hbatchno : '/', |
| | | qualitystatus: res.data.labcont[0].qualitystatus, |
| | | }) |
| | | |
| | | this.purchorderObj = this.purchorderArr[0] |
| | | |
| | | this.radioValue = res.data.labcont[0].hbarcode |
| | | |
| | | } |
| | | }, |
| | | // è·åæ£éªæ¹æ¡ |
| | | async getQualityScheme() { |
| | | const res = await QualityScheme() |
| | | this.sheetList = res.data |
| | | this.columns = [res.data.map(r => r.name)] |
| | | }, |
| | | |
| | | |
| | | // 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="å
¥åæ£éª"></page-nav> |
| | | |
| | | |
| | | |
| | | <view class="mainContent"> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="height: 300rpx;overflow: auto;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | è´¨æ£æ¹æ¡ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20"> |
| | | <view class="marginBottom20" style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>æ¹æ¡åç§°ï¼</view> |
| | | <view>æ½æ ·æ¹å¼ï¼</view> |
| | | <view>æ»æ°éï¼</view> |
| | | <view>æ ·æ¬æ°éï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{purchorderObj.checkstandname}}</view> |
| | | <view>{{purchorderObj.sampmethod==='FIXED'?'åºæ¶æ½æ£':'æ¯ä¾æ½æ£'}}</view> |
| | | <view>{{purchorderObj.hqty}}</view> |
| | | <!-- <view>{{purchorderObj.sampscare}}</view> --> |
| | | <u-number-box inputWidth='110' v-model="purchorderObj.sampscare" min='1' |
| | | :max='purchorderObj.hqty' class="contentFont" @change="hqtyChange"></u-number-box> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-gap height="20" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="max-height: 1020rpx;overflow: scroll;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | æ£éªé¡¹ç® |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="marginBottom20 marginTop10" |
| | | style="display: flex;justify-content: center;align-items: center;"> |
| | | <u-button type="primary" :disabled="checkNumber===1" @click="preTo" |
| | | style="width: 200rpx;margin-left: 0%; " plain text="ä¸ä¸ä»¶"></u-button> |
| | | <view style="margin-left: 5%;">{{checkNumber}}/{{purchorderObj.sampscare}}</view> |
| | | <u-button type="primary" |
| | | :disabled="checkNumber===purchorderObj.sampscare||purchorderDetailArr%purchorderDetailArr.filter(i=>i.isPlain!=='').length===0" |
| | | @click="nextTo" style="width: 200rpx;margin-left: 7%; " plain text="ä¸ä¸ä»¶"></u-button> |
| | | </view> |
| | | |
| | | <u-gap height="6" style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap> |
| | | |
| | | |
| | | <view class="marginLeft20 marginRight20 marginTop20"> |
| | | <view class="marginBottom20 flex_column" v-for="(item,index) in purchorderDetailArr" |
| | | v-if="item.checkNumber===checkNumber" :key="item.name+index+checkNumber"> |
| | | |
| | | <!-- {{item.name+index+checkNumber}} --> |
| | | <view class="flex_between marginLeft20 marginRight20"> |
| | | <view class="contentFont">{{item.name}}({{item.unit}})</view> |
| | | <view class="titleFont" style="display: flex;"> |
| | | <view> |
| | | {{item.standvalue}} |
| | | </view> |
| | | <view v-if="item.lowervalue&&item.uppervalue"> |
| | | ({{item.lowervalue}}~{{item.uppervalue}}) |
| | | </view> |
| | | <view v-if="!item.lowervalue&&item.uppervalue"> |
| | | (~{{item.uppervalue}}) |
| | | </view> |
| | | <view v-if="item.lowervalue&&!item.uppervalue"> |
| | | ({{item.lowervalue}}~) |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="flex_between marginLeft20 marginTop10"> |
| | | <view class="contentFont " style="display: flex;align-items: center;"> |
| | | <view class="contentFont"> |
| | | 宿µå¼ï¼ |
| | | </view> |
| | | |
| | | <view class="inputClass " style="width: 40%;"> |
| | | <!-- padding: 6rpx 18rpx; --> |
| | | |
| | | <u--input style="" placeholder="请è¾å
¥" border="surround" v-model="item.real_value" |
| | | @change='val=>realValueBlur(val,item)'></u--input> |
| | | </view> |
| | | |
| | | <view style="display: flex;"> |
| | | <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;" |
| | | shape="circle" @click="item.isPlain=true;$forceUpdate()" |
| | | :disabled="item.required==='Y'&&!item.real_value" :plain='!item.isPlain' |
| | | text="åæ ¼"></u-button> |
| | | |
| | | |
| | | <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;" |
| | | shape="circle" :plain='item.isPlain' |
| | | :disabled="item.required==='Y'&&!item.real_value" |
| | | @click="item.isPlain=false;$forceUpdate()" text="ä¸åæ ¼"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class=" marginLeft20 marginRight20 marginTop10"> |
| | | <view class="titleFont"> æè¿°ï¼{{item.stepcheckitem_desc}}</view> |
| | | </view> |
| | | <view class=" marginLeft20 marginRight20 marginTop10 marginBottom20" |
| | | style="display: flex;align-items: center;"> |
| | | <view class="contentFont"> 夿³¨ï¼</view> |
| | | <view class="inputClass " style=""> |
| | | <u--input style="" placeholder="请è¾å
¥" border="surround" |
| | | v-model="item.stepcheckitem_remark"></u--input> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-gap height="6" |
| | | v-if="(index+1)%purchorderDetailArr.map(i=>i.checkNumber===1).filter(i=>i).length!==0" |
| | | style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- {{purchorderDetailArr.length}} --> |
| | | <view class="footer" style="min-height:62rpx;"> |
| | | <u-button type="primary" :disabled="!(purchorderDetailArr.filter(i=>i.isPlain==='').length===0)" |
| | | size='large' :hairline="true" @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | InFactoryCheckItem |
| | | |
| | | } from '../../config/api.js'; |
| | | const App = getApp() |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | console.log(option) |
| | | |
| | | this.passPurchorderObj = option.purchorderObj |
| | | |
| | | const t1 = JSON.parse(option.radioSelectValue) |
| | | |
| | | this.passToNext = option.radioSelectValue |
| | | |
| | | this.purchorderObj.checkstandname = option.checkstandname |
| | | this.purchorderObj.checkstandcode = option.checkstandcode |
| | | this.purchorderObj.sampmethod = option.sampmethod |
| | | this.purchorderObj.hqty = JSON.parse(option.radioSelectValue).hqty |
| | | |
| | | this.purchorderObj.sampscare = option.sampmethod === 'FIXED' ? option.sampscare : Math.ceil(parseFloat( |
| | | JSON.parse(option.radioSelectValue).hqty) * parseFloat(option.sampscare) / 100) |
| | | |
| | | this.purchorderObj.sampscare = this.purchorderObj.sampscare <= this.purchorderObj.hqty ? this.purchorderObj |
| | | .sampscare : this.purchorderObj.hqty |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | |
| | | passPurchorderObj: {}, //页é¢1ä¼ è¿æ¥ç对象 |
| | | |
| | | passToNext: {}, //ä¼ ç»é¡µé¢3çåæ° |
| | | |
| | | |
| | | purchorderObj: { |
| | | checkstandcode: 'BZ01', //æ¹æ¡ç¼ç |
| | | checkstandname: 'æ å01', //æ¹æ¡åç§° |
| | | sampmethod: 'FIXED', //æ½æ ·æ¹å¼ |
| | | hqty: 30, //æ»æ°é |
| | | sampscare: 3, //æ ·æ¬æ°é |
| | | }, |
| | | |
| | | checkNumber: 1, //æ£éªé¡¹ç®ä¸çæ£éªæ°é ç°å¨å¤äºç¬¬å 个 |
| | | |
| | | purchorderDetailArr: [ |
| | | // { |
| | | // stepcheckitem_seq: '1', |
| | | // name: 'è´¨æ£1S(KG)', |
| | | // code: '', |
| | | // standvalue: '6.5', |
| | | // lowervalue: '6.0', |
| | | // uppervalue: '7.0', |
| | | // real_value: '', //宿µå¼ |
| | | // unit: '', //åä½ |
| | | // required: '', //æ¯å¦å¿
å¡« |
| | | // numberjudge: '', //æ°å¼å¤æ |
| | | // stepcheckitem_desc: 'æ£æµå¤è§å
å¾.éç¨ä¸ä¸ä»ªå¨', |
| | | // stepcheckitem_remark: '', //夿³¨ |
| | | // isPlain: false |
| | | // }, { |
| | | // stepcheckitem_seq: '2', |
| | | // name: 'è´¨æ£1S(KG)', |
| | | // code: '', |
| | | // standvalue: '6.5', |
| | | // lowervalue: '6.0', |
| | | // uppervalue: '7.0', |
| | | // real_value: '', //宿µå¼ |
| | | // unit: '', |
| | | // required: '', //æ¯å¦å¿
å¡« |
| | | // numberjudge: '', //æ°å¼å¤æ |
| | | // stepcheckitem_desc: 'æ£æµå¤è§å
å¾.éç¨ä¸ä¸ä»ªå¨', |
| | | // stepcheckitem_remark: '', //夿³¨ |
| | | // isPlain: true |
| | | // }, |
| | | // { |
| | | // stepcheckitem_seq: '3', |
| | | // name: 'è´¨æ£1S(KG)', |
| | | // code: '', |
| | | // standvalue: '6.5', |
| | | // lowervalue: '6.0', |
| | | // uppervalue: '7.0', |
| | | // real_value: '', |
| | | // unit: '', |
| | | // required: '', //æ¯å¦å¿
å¡« |
| | | // numberjudge: '', //æ°å¼å¤æ |
| | | // stepcheckitem_desc: 'æ£æµå¤è§å
å¾.éç¨ä¸ä¸ä»ªå¨', |
| | | // stepcheckitem_remark: '', |
| | | // isPlain: false |
| | | // }, |
| | | // { |
| | | // stepcheckitem_seq: '4', |
| | | // name: 'è´¨æ£1S(KG)', |
| | | // code: '', |
| | | // standvalue: '6.5', |
| | | // lowervalue: '6.0', |
| | | // uppervalue: '7.0', |
| | | // real_value: '', |
| | | // unit: '', |
| | | // required: '', //æ¯å¦å¿
å¡« |
| | | // numberjudge: '', //æ°å¼å¤æ |
| | | // stepcheckitem_desc: 'æ£æµå¤è§å
å¾.éç¨ä¸ä¸ä»ªå¨', |
| | | // stepcheckitem_remark: '', |
| | | // isPlain: false |
| | | // }, |
| | | ], |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | this.getInFactoryCheckItem() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | async getInFactoryCheckItem() { |
| | | const data = { |
| | | checkstandcode: this.purchorderObj.checkstandcode |
| | | } |
| | | const res = await InFactoryCheckItem(this.global.formatData(data)) |
| | | |
| | | for (var i = 0; i < this.purchorderObj.sampscare; i++) { |
| | | |
| | | res.data.forEach(j => { |
| | | this.purchorderDetailArr.push({ |
| | | checkNumber: i + 1, |
| | | stepcheckitem_seq: j.stepcheckitem_seq, |
| | | name: j.name, |
| | | code: j.code, |
| | | standvalue: j.standvalue, |
| | | lowervalue: j.lowervalue, |
| | | uppervalue: j.uppervalue, |
| | | real_value: j.real_value, |
| | | unit: j.unit, |
| | | stepcheckitem_desc: j.stepcheckitem_desc, |
| | | stepcheckitem_remark: '', |
| | | isPlain: '', |
| | | required: j.required, //æ¯å¦å¿
å¡« |
| | | numberjudge: j.numberjudge, //æ°å¼å¤æ |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | |
| | | console.log(JSON.parse(JSON.stringify(this.purchorderDetailArr)), 999) |
| | | |
| | | }, |
| | | |
| | | //æ ·æ¬æ°é弿¹å |
| | | hqtyChange(val) { |
| | | |
| | | console.log(val.value) |
| | | const t = this.purchorderDetailArr.filter(i => i.checkNumber === 1) |
| | | let len = this.purchorderDetailArr.length / t.length |
| | | |
| | | // ä»¶æ°åå°æ¶ |
| | | if (val.value < this.purchorderDetailArr.length / t.length) { |
| | | this.purchorderDetailArr.reverse() |
| | | const a = this.purchorderDetailArr.splice(0, t.length * (len - val.value)) |
| | | this.purchorderDetailArr.reverse() |
| | | if (this.checkNumber > val.value) { |
| | | this.checkNumber = val.value |
| | | } |
| | | } |
| | | |
| | | |
| | | // ä»¶æ°å夿¶ |
| | | if (val.value > this.purchorderDetailArr.length / t.length) { |
| | | |
| | | for (var i = val.value; i > len; i--) { |
| | | t.forEach(j => { |
| | | this.purchorderDetailArr.push({ |
| | | checkNumber: i, |
| | | stepcheckitem_seq: j.stepcheckitem_seq, |
| | | name: j.name, |
| | | code: j.code, |
| | | standvalue: j.standvalue, |
| | | lowervalue: j.lowervalue, |
| | | uppervalue: j.uppervalue, |
| | | real_value: '', |
| | | unit: j.unit, |
| | | stepcheckitem_desc: j.stepcheckitem_desc, |
| | | stepcheckitem_remark: '', |
| | | isPlain: '', |
| | | required: j.required, //æ¯å¦å¿
å¡« |
| | | numberjudge: j.numberjudge, //æ°å¼å¤æ |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | this.purchorderDetailArr.sort((a, b) => a.checkNumber - b.checkNumber) |
| | | |
| | | } |
| | | |
| | | // console.log(this.purchorderDetailArr, 1) |
| | | // console.log(this.purchorderDetailArr.length, 1) |
| | | this.$forceUpdate() |
| | | }, |
| | | |
| | | navigateTo() { |
| | | |
| | | // console.log(this.passPurchorderObj) |
| | | |
| | | // console.log(JSON.parse(JSON.stringify(this.purchorderDetailArr))) |
| | | |
| | | // let t = |
| | | |
| | | // 计ç®OKå¼ |
| | | let goodqty = 0; |
| | | for (var i = 0; i < this.purchorderObj.sampscare; i++) { |
| | | let flag = this.purchorderDetailArr.filter(j => j.checkNumber === i + 1).every(j => j.isPlain) |
| | | if (flag) { |
| | | goodqty++ |
| | | } |
| | | } |
| | | |
| | | |
| | | uni.navigateTo({ |
| | | url: './rcjy3?passPurchorderObj=' + JSON.stringify(this.passPurchorderObj) + |
| | | '&purchorderDetailArr=' + JSON |
| | | .stringify(this.purchorderDetailArr) + '&passToNext=' + this.passToNext + |
| | | '&purchorderObj=' + JSON.stringify(this.purchorderObj) + '&sampleqty=' + this.purchorderObj |
| | | .sampscare + '&goodqty=' + goodqty |
| | | }); |
| | | }, |
| | | |
| | | // ä¸ä¸ä»¶ |
| | | preTo() { |
| | | if (this.checkNumber > 1) { |
| | | this.checkNumber-- |
| | | } |
| | | |
| | | }, |
| | | |
| | | //ä¸ä¸ä»¶ |
| | | nextTo() { |
| | | if (this.checkNumber < this.purchorderObj.sampscare) { |
| | | this.checkNumber++ |
| | | } |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | console.log(JSON.parse(JSON.stringify(this.purchorderDetailArr))) |
| | | |
| | | // let t = JSON.parse(JSON.stringify(this.purchorderDetailArr)) |
| | | // t.forEach(i=>{ |
| | | // i.isPlain='' |
| | | // }) |
| | | |
| | | }, |
| | | |
| | | // 宿µå¼è¾å
¥æ¶å¤±ç¦ç¶æ |
| | | realValueBlur(val, item) { |
| | | console.log(val === '', item) |
| | | |
| | | |
| | | if (val.value !== '') { |
| | | if (item.numberjudge === 'Y') { //妿éè¦è¿è¡æ°å¼å¤æ |
| | | |
| | | if (item.uppervalue === '' && item.lowervalue === '') { //ä¸éå¼ä¸ºç©ºï¼ä¸éå¼ä¸ºç©º |
| | | if (parseFloat(val) === parseFloat(item.standvalue)) { |
| | | item.isPlain = true |
| | | } else { |
| | | item.isPlain = false |
| | | } |
| | | } |
| | | |
| | | |
| | | if (item.uppervalue !== '' && item.lowervalue !== '') { //ä¸éå¼ä¸ä¸ºç©ºï¼ä¸éå¼ä¸ä¸ºç©º |
| | | if (parseFloat(val) >= parseFloat(item.lowervalue) && parseFloat(val) <= |
| | | parseFloat(item.uppervalue)) { |
| | | item.isPlain = true |
| | | } else { |
| | | item.isPlain = false |
| | | } |
| | | } |
| | | |
| | | |
| | | if (item.uppervalue !== '' && item.lowervalue === '') { //ä¸éå¼ä¸ä¸ºç©ºï¼ä¸éå¼ä¸ºç©º |
| | | if (parseFloat(val) <= parseFloat(item.uppervalue)) { |
| | | item.isPlain = true |
| | | } else { |
| | | item.isPlain = false |
| | | } |
| | | } |
| | | |
| | | if (item.uppervalue === '' && item.lowervalue !== '') { //ä¸éå¼ä¸ºç©ºï¼ä¸éå¼ä¸ä¸ºç©º |
| | | if (parseFloat(val) >= parseFloat(item.lowervalue)) { |
| | | item.isPlain = true |
| | | } else { |
| | | item.isPlain = false |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | if (val === '') { |
| | | item.isPlain = '' |
| | | } |
| | | // this.$forceUpdate() |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | ::v-deep .u-input { |
| | | padding: 6rpx 18rpx !important; |
| | | } |
| | | |
| | | ::v-deep .u-number-box__minus { |
| | | height: 50rpx !important; |
| | | } |
| | | |
| | | ::v-deep .u-number-box__input { |
| | | height: 50rpx !important; |
| | | |
| | | } |
| | | |
| | | ::v-deep .u-number-box__plus { |
| | | height: 50rpx !important; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="å
¥åæ£éª"></page-nav> |
| | | |
| | | <view class="mainContent"> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | ç©æä¿¡æ¯ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20"> |
| | | <view class="marginBottom20" style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>åæ®ç¼å·ï¼</view> |
| | | <view>ç©ææ ç¾ï¼</view> |
| | | <view>ç©æç¼ç ï¼</view> |
| | | <view>ç©æåç§°ï¼</view> |
| | | <view>ç©æè§æ ¼ï¼</view> |
| | | <view>便¹ä¿¡æ¯ï¼</view> |
| | | <view>éè´æ¹æ¬¡ï¼</view> |
| | | <view>è´¨éç¶æï¼</view> |
| | | <view>ç©ææ°éï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{purchorderArr.hbillno}}</view> |
| | | <view>{{purchorderArr.labcode}}</view> |
| | | <view>{{purchorderArr.partcode}}</view> |
| | | <view>{{purchorderArr.partname}}</view> |
| | | <view>{{purchorderArr.partspec}}</view> |
| | | <view class="ellipsis" style="width: 460rpx;">{{purchorderArr.customername}}</view> |
| | | <view>{{purchorderArr.hbatchno}}</view> |
| | | <view style="display: flex;align-items: center;"> |
| | | <u-icon :name="isPlain?'checkmark-circle-fill':'close-circle-fill'" |
| | | :color="isPlain?'#55ff00':'#FF0000'" size="20"></u-icon> |
| | | <view style="margin-left: 10rpx;"> |
| | | {{isPlain?'åæ ¼':'ä¸åæ ¼'}} |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <view>{{purchorderArr.hqty}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | <u-gap height="20" bgColor="#eff0f1"></u-gap> |
| | | <view class="head"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | æ£éªç»æ |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20 marginBottom20"> |
| | | <view class="" style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>æ ·æ¬æ°éï¼</view> |
| | | <view>åæ ¼æ°éï¼</view> |
| | | <view>ä¸åæ ¼æ°éï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{purchorderArr.sampleqty}} 个</view> |
| | | <view>{{purchorderArr.goodqty}} 个</view> |
| | | <view>{{purchorderArr.sampleqty-purchorderArr.goodqty}} 个</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view style="display: flex;margin-top: 30rpx;"> |
| | | <u-button type="primary" @click="isPlain=true" style="width: 200rpx;margin-left: 0%; " |
| | | :plain="!isPlain" text="åæ ¼"></u-button> |
| | | <u-button type="warning" @click="isPlain=false" style="width: 200rpx;margin-left: 10%; " |
| | | :plain="isPlain" text="ä¸åæ ¼"></u-button> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | |
| | | <u-gap height="20" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head"> |
| | | <view class="head_block marginBottom10"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title" style="font-weight: bolder;"> |
| | | 忥è³ç¸åæ¹æ¬¡ |
| | | </view> |
| | | </view> |
| | | <view class="marginRight20"> |
| | | <u-switch v-model="switchValue" size="23"></u-switch> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-button type="primary" size='large' :hairline="true" :loading="isDisabledSubmitButton" @click="submit" |
| | | loadingText="æ£å¨æäº¤,请ç¨ç..." text="确认æäº¤"></u-button> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | // import { |
| | | |
| | | |
| | | // } from '../../config/api.js'; |
| | | const App = getApp() |
| | | export default { |
| | | onLoad(option) { |
| | | |
| | | let t1 = JSON.parse(JSON.parse(option.passPurchorderObj)) |
| | | |
| | | let t2 = JSON.parse(option.purchorderDetailArr) |
| | | |
| | | let t3 = JSON.parse(option.purchorderObj) |
| | | |
| | | let t4 = JSON.parse(option.passToNext) |
| | | |
| | | console.log(t1, 1) |
| | | console.log(t2, 2) |
| | | console.log(t3, 3) |
| | | console.log(t4, 4) |
| | | |
| | | this.purchorderArr.hbillno = t1.hbillno |
| | | this.purchorderArr.partcode = t1.partcode |
| | | this.purchorderArr.partname = t1.partname |
| | | this.purchorderArr.partspec = t1.partspec ? t1.partspec : '/' |
| | | |
| | | |
| | | |
| | | this.purchorderArr.customercode = t4.hcustomercode |
| | | this.purchorderArr.customername = t4.hcustomername |
| | | this.purchorderArr.hqty = t4.hqty |
| | | this.purchorderArr.sampmethod = t4.sampmethod |
| | | this.purchorderArr.labcode = t4.hbarcode |
| | | this.purchorderArr.hbatchno = t4.hbatchno ? t4.hbatchno : '/' |
| | | |
| | | |
| | | |
| | | this.purchorderArr.sampleqty = option.sampleqty |
| | | this.purchorderArr.goodqty = option.goodqty |
| | | |
| | | |
| | | this.passPurchorderDetailArr = t2 |
| | | |
| | | this.passPurchorderBZObj = t3 |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | purchorderArr: { |
| | | hbillno: 'CG20221018000001', //åæ®ç¼å· |
| | | labcode: 'ZG20221018000001', //ç©ææ ç¾ |
| | | partcode: 'ZG-Y-001', //ç©æç¼ç |
| | | partname: 'ZGåææ001', //ç©æåç§° |
| | | partspec: 'ZG#30*50', //ç©æè§æ ¼ |
| | | customername: 'ZGå¤åä¾åºå', //便¹ä¿¡æ¯ |
| | | customercode: '0101101', //便¹ç¼ç |
| | | hbatchno: '/', //éè´æ¹æ¬¡ |
| | | qualitystatus: '/', //è´¨éç¶æ |
| | | hqty: 0, //ç©ææ°é |
| | | |
| | | |
| | | sampleqty: 0, //æ½æ ·æ°é |
| | | goodqty: 0, //åæ ¼æ°é |
| | | ngqty: 0, //ä¸åæ ¼æ°é |
| | | }, |
| | | |
| | | passPurchorderDetailArr: [], //页é¢äºä¼ è¿æ¥çå¼ æ¯ä¸ªå项çå¼ |
| | | |
| | | passPurchorderBZObj: [], //页é¢äºä¼ è¿æ¥çå¼ æ¯ä¸ªå项çå¼ |
| | | |
| | | |
| | | isPlain: true, |
| | | switchValue: true, |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | |
| | | this.isPlain = this.purchorderArr.sampleqty === this.purchorderArr.goodqty |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | submit() { |
| | | const header = { |
| | | // 'Content-Type': 'multipart/form-data', |
| | | 'Content-Type': 'application/x-www-form-urlencoded', |
| | | 'rediskey': uni.getStorageSync('rediskey'), |
| | | 'admin': uni.getStorageSync('usercode'), |
| | | 'username': encodeURIComponent(uni.getStorageSync('username')), |
| | | 'navTabId': uni.getStorageSync('usercode'), |
| | | 'userid': uni.getStorageSync('userid'), |
| | | 'guid': uni.getStorageSync('guid'), |
| | | 'usertype': 'APP' |
| | | } |
| | | |
| | | let checkitemcont = [] |
| | | |
| | | |
| | | this.passPurchorderDetailArr.forEach((i, index) => { |
| | | checkitemcont.push({ |
| | | checknum: i.checkNumber + '/' + this.passPurchorderDetailArr.length / this |
| | | .passPurchorderDetailArr.filter(j => j.checkNumber === 1).length, |
| | | checkiem_seq: i.stepcheckitem_seq, |
| | | checkitem_code: i.code, |
| | | checkitem_name: i.name, |
| | | check_value: i.real_value ? i.real_value : '', |
| | | check_result: i.isPlain ? 'OK' : 'NG', |
| | | checkitem_descr: i.stepcheckitem_remark |
| | | }) |
| | | }) |
| | | |
| | | |
| | | let formData = { |
| | | hbillno: this.purchorderArr.hbillno, |
| | | labcode: this.purchorderArr.labcode, |
| | | checkstandcode: this.passPurchorderBZObj.checkstandcode, |
| | | check_type: 'InCheck', |
| | | sampmethod: this.passPurchorderBZObj.sampmethod, |
| | | partcode: this.purchorderArr.partcode, |
| | | customercode: this.purchorderArr.customercode, |
| | | batchno: this.purchorderArr.hbatchno === '/' ? '' : this.purchorderArr.hbatchno, //æ¹æ¬¡ |
| | | qualitystatus: this.isPlain ? 'OK' : 'NG', |
| | | labqty: parseFloat(this.purchorderArr.hqty), |
| | | |
| | | sampleqty: parseFloat(this.purchorderArr.sampleqty), |
| | | goodqty: parseFloat(this.purchorderArr.goodqty), |
| | | ngqty: parseFloat(this.purchorderArr.sampleqty) - parseFloat(this.purchorderArr.goodqty), |
| | | issyncbatch: this.switchValue ? 'Y' : 'N', //æ¯å¦åæ¹æ¬¡ |
| | | |
| | | admin: uni.getStorageSync('usercode'), |
| | | checkitemcont: JSON.stringify(checkitemcont) |
| | | } |
| | | |
| | | console.log(formData, 888) |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/AppQualityManagement/InFactoryCheckSave', |
| | | files: [{ |
| | | "uri": "/" |
| | | }], |
| | | header: header, |
| | | formData: formData, |
| | | success: (res) => { |
| | | console.log(res, 999) |
| | | let result = JSON.parse(res.data) |
| | | if (res.statusCode == 200 && result.code == '200') { |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | |
| | | // uni.navigateTo({ |
| | | // url: './rcjy?partcode=' + this.purchorderArr.partcode + '&hbatchno=' + |
| | | // this.purchorderArr.hbatchno + '&issyncbatch=' + this.switchValue + |
| | | // '&labcode=' + this.purchorderArr.labcode + '&hbillno=' + this |
| | | // .purchorderArr.hbillno |
| | | // }) |
| | | |
| | | |
| | | let prevPage = getCurrentPages()[getCurrentPages().length - 3]; // ä¸ä¸ä¸é¡µé¢å®ä¾ |
| | | const data = { |
| | | issyncbatch: this.switchValue ? 'Y' : 'N', |
| | | partcode: this.purchorderArr.partcode, |
| | | hbatchno: this.purchorderArr.hbatchno, |
| | | labcode: this.purchorderArr.labcode, |
| | | hbillno: this.purchorderArr.hbillno |
| | | } |
| | | prevPage.$vm.fromSubmitData(data) // è°ç¨ä¸ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | uni.navigateBack({ |
| | | delta: 2, //è¿å屿°ï¼2åä¸ä¸é¡µ 使ç¨è¿ç§æ¹æ³ä»¥å
æè§é¡µé¢è·³å¨çæè§ |
| | | }) |
| | | |
| | | } else { |
| | | uni.$u.toast(result.Message) |
| | | } |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | fail(res) { |
| | | console.log(res, 1000) |
| | | uni.$u.toast('æäº¤å¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const api = uni.requireNativePlugin("DothanTech-LPAPI"); |
| | | |
| | | function request(action, data, callback) { |
| | | console.log(`### Request: action = ${action}`); |
| | | console.log(data ? JSON.stringify(data) : data); |
| | | return new Promise((resolve) => { |
| | | if (api && api[action]) { |
| | | api[action](data || {}, (result) => { |
| | | console.log(`### Response:`); |
| | | console.log(JSON.stringify(data)); |
| | | if (result && result.code === 0) { |
| | | resolve(result.data || true); |
| | | } else { |
| | | resolve(undefined); |
| | | console.log(result.data); |
| | | } |
| | | if (typeof callback === "function") { |
| | | callback(result.code === 0 ? result.data : null); |
| | | } |
| | | }); |
| | | } else { |
| | | if (api) { |
| | | resolve(undefined); |
| | | console.log("LPAPIæä»¶å 载失败"); |
| | | } else { |
| | | resolve(undefined); |
| | | console.log("æªæ£æµå°è¯¥æ¹æ³:" + action); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const lpapi = { |
| | | /** |
| | | * è·åæå®åå·çæææå°æºï¼ |
| | | * @param { string | {name?: string} } data åæ°ï¼ |
| | | * @returns { {name: string, macAddress?: string}[] } è·åæå°æºåè¡¨ï¼ |
| | | */ |
| | | getPrinters(data) { |
| | | if (typeof data === "string") { |
| | | data = { |
| | | name: data |
| | | }; |
| | | } |
| | | return request("getPrinters", data); |
| | | }, |
| | | /** |
| | | * è·åæå®åå·çä¸å°æå°æºï¼ |
| | | * @param { string | {name?: string} } data åæ°ï¼ |
| | | * @returns { {name: string, macAddress?: string} } è·åæ£æµå°ç第ä¸å°æå°æºï¼ |
| | | */ |
| | | getFirstPrinter(data) { |
| | | if (typeof data === "string") { |
| | | data = { |
| | | name: data |
| | | }; |
| | | } |
| | | return request("getFirstPrinter", data); |
| | | }, |
| | | /** |
| | | * |
| | | * @param { string | {name?: string}} data åæ°ï¼ |
| | | */ |
| | | openPrinter(data, callback) { |
| | | if (typeof data === "string") { |
| | | data = { |
| | | name: data |
| | | }; |
| | | } |
| | | return request("openPrinter", typeof data === "object" ? data : {}, callback); |
| | | }, |
| | | /** |
| | | * è·åå½åå·²è¿æ¥æå°æºåç§°ï¼ |
| | | */ |
| | | getPrinterName() { |
| | | return request("getPrinterName", {}); |
| | | }, |
| | | /** |
| | | * è·åå½åå·²è¿æ¥æå°æºä¿¡æ¯ï¼ |
| | | * è°ç¨è¯¥æ¥å£åè¦ç¡®ä¿æå°æºå·²è¿æ¥ï¼ |
| | | */ |
| | | getPrinterInfo() { |
| | | return request("getPrinterInfo", {}); |
| | | }, |
| | | // /** |
| | | // * è·åå½åæå°æºçè¿æ¥ç¶æï¼ |
| | | // */ |
| | | // getPrinterState() { |
| | | // return request('getPrinterState', {}); |
| | | // }, |
| | | /** |
| | | * å½åæå°æºæ¯å¦å·²ç»æå¼ï¼ |
| | | */ |
| | | isPrinterOpened() { |
| | | return request("isPrinterOpened", {}); |
| | | }, |
| | | /** |
| | | * |
| | | * @param { string | {}} data åæ°ï¼ |
| | | * @param {string} data.name |
| | | * @param {string} data.model |
| | | * @returns |
| | | */ |
| | | isPrinterSupported(data) { |
| | | data = |
| | | typeof data === "object" ? |
| | | data : |
| | | { |
| | | name: arguments[0], |
| | | model: arguments[1], |
| | | }; |
| | | return request("isPrinterSupported", data || {}); |
| | | }, |
| | | // /** |
| | | // * åæ¶å½åæå°ä»»å¡ï¼ |
| | | // */ |
| | | // cancel() { |
| | | // return request('cancel', {}); |
| | | // }, |
| | | /** |
| | | * å
³éæå°æºï¼ |
| | | */ |
| | | closePrinter() { |
| | | return request("closePrinter", {}); |
| | | }, |
| | | /** |
| | | * æå°BASE64å¾çï¼ |
| | | * @param {{}} data |
| | | * @param {string} data.image |
| | | * @param {number} data.PRINT_DENSITY |
| | | * @param {number} data.PRINT_SPEED |
| | | * @param {number} data.PRINT_COPIES |
| | | */ |
| | | printImage(data) { |
| | | return request("printImage", data); |
| | | }, |
| | | /** |
| | | * å¼å§æå°ä»»å¡ï¼ |
| | | * @param {{}} data åæ°ï¼ |
| | | * @param {number} data.width |
| | | * @param {number} data.height |
| | | * @param {number} data.orientation |
| | | */ |
| | | startJob(data) { |
| | | return request("startJob", data); |
| | | }, |
| | | // /** |
| | | // * ç»æ¢æå°ä»»å¡ï¼ |
| | | // */ |
| | | // abortJob() { |
| | | // return request('abortJob', {}); |
| | | // }, |
| | | /** |
| | | * æäº¤æå°ä»»å¡ï¼ |
| | | * @param {{}} data åæ°ï¼ |
| | | * @param {number} data.PRINT_DENSITY |
| | | * @param {number} data.PRINT_SPEED |
| | | * @param {number} data.PRINT_COPIES |
| | | */ |
| | | commitJob(data) { |
| | | return request("commitJob", data); |
| | | }, |
| | | // /** |
| | | // * å¼å§æå°é¡µé¢ï¼ |
| | | // */ |
| | | // startPage() { |
| | | // return request('startPage', {}); |
| | | // }, |
| | | // /** |
| | | // * ç»ææå°é¡µé¢ï¼ |
| | | // */ |
| | | // endPage() { |
| | | // return request('endPage', {}); |
| | | // }, |
| | | /** |
| | | * ç»ææå°ä»»å¡ï¼ |
| | | */ |
| | | endJob() { |
| | | return request("endJob", {}); |
| | | }, |
| | | /** |
| | | * è·åå½åçæå°ä»»å¡ï¼ |
| | | */ |
| | | getJobPages() { |
| | | return request("getJobPages", {}); |
| | | }, |
| | | // |
| | | /** |
| | | * 设置åç»ç»å¶åæ°ï¼è¬å¦åä½åç§°ï¼äºç»´ç çº é级å«ççï¼ |
| | | * @param {{}} data åæ° |
| | | * @param {string} name |
| | | * @param value |
| | | */ |
| | | setDrawParam(data) { |
| | | return request("setDrawParam", data); |
| | | }, |
| | | // /** |
| | | // * è·åå½åå
容çæè½¬è§åº¦ï¼ |
| | | // */ |
| | | // getItemOrientation() { |
| | | // return request('getItemOrientation', {}); |
| | | // }, |
| | | /** |
| | | * 设置åç»å
容çæè½¬æ¹åï¼ |
| | | * @param { number | { orientation: [0, 90, 180, 270]}} data åæ°ï¼ |
| | | */ |
| | | setItemOrientation(data) { |
| | | data = typeof data === "object" ? data : { |
| | | orientation: data |
| | | }; |
| | | return request("setItemOrientation", data); |
| | | }, |
| | | // /** |
| | | // * è·åå½åçæ°´å¹³å¯¹é½æ¹å¼ï¼ |
| | | // */ |
| | | // getItemHorizontalAlignment() { |
| | | // return request('getItemHorizontalAlignment', {}); |
| | | // }, |
| | | /** |
| | | * è®¾ç½®æ°´å¹³å¯¹é½æ¹å¼ï¼ |
| | | * @param { number | { alignment: [0, 1, 2]}} data åæ°ï¼ |
| | | */ |
| | | setItemHorizontalAlignment(data) { |
| | | data = typeof data === "object" ? data : { |
| | | alignment: data |
| | | }; |
| | | return request("setItemHorizontalAlignment", data); |
| | | }, |
| | | // /** |
| | | // * è·åå½åçåç´å¯¹é½æ¹å¼ï¼ |
| | | // */ |
| | | // getItemVerticalAlignment() { |
| | | // return request('getItemVerticalAlignment', {}); |
| | | // }, |
| | | /** |
| | | * 设置åç´å¯¹é½æ¹å¼ï¼ |
| | | * @param { number | { alignment: [0, 1, 2]}} data åæ°ï¼ |
| | | */ |
| | | setItemVerticalAlignment(data) { |
| | | data = typeof data === "object" ? data : { |
| | | alignment: data |
| | | }; |
| | | return request("setItemVerticalAlignment", data); |
| | | }, |
| | | /** |
| | | * è®¾ç½®èæ¯è²ï¼ |
| | | * é»è®¤ç½è²åºè²ï¼0xFFFFFFFFï¼ |
| | | * å¦ééæè²ï¼å¯è®¾ç½®ï¼0x00000000ï¼ |
| | | * @param { number | {color: number} } data åæ°ï¼ |
| | | */ |
| | | setBackground(data) { |
| | | data = typeof data === "object" ? data : { |
| | | color: data |
| | | }; |
| | | return request("setBackground", data); |
| | | }, |
| | | |
| | | // *************************************************** |
| | | // * æå°ç¸å
³å¾å½¢å¯¹è±¡ã |
| | | // *************************************************** |
| | | |
| | | /** |
| | | * ç»å¶åç¬¦ä¸²ï¼ |
| | | * |
| | | * @param {{}} data å符串ç»å¶åæ°ï¼ |
| | | * @param {string} data.text å¾
æå°çå符串åç§°ï¼ |
| | | * @param {number} data.x å符串æ¾ç¤ºçXè½´åæ ä½ç½®(å使¯«ç±³)ï¼ |
| | | * @param {number} data.y å符串æ¾ç¤ºçYè½´åæ ä½ç½®(å使¯«ç±³)ï¼ |
| | | * @param {number} data.width å符串æ¾ç¤ºåºå宽度(å使¯«ç±³)ï¼ |
| | | * @param {number} data.height å符串æ¾ç¤ºåºåé«åº¦(å使¯«ç±³)ï¼ |
| | | * @param {number} data.fontHeight åä½å¤§å°(å使¯«ç±³); |
| | | * @param {number} data.fontStyle å使 ·å¼ï¼é»è®¤ä½0ï¼ï¼0ï¼å¸¸è§ï¼1ï¼é»ä½ï¼2ï¼æä½ï¼3ï¼ç²æä½ï¼ |
| | | * @param {string} data.fontName åä½åç§°ï¼é»è®¤ä½"é»ä½"; |
| | | * @param {boolean} data.autoReturn å符串é¿åº¦è¶
è¿widthä¹åï¼æ¯å¦èªå¨æ¢è¡ï¼é»è®¤ä½true; |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼ |
| | | * @param {0|1|2} data.horizontalAlignment åç¬¦ä¸²å¨æå®ç宽é«èå´å
çæ°´å¹³å¯¹é½æ¹å¼ï¼é»è®¤ä»¥setItemHorizontalAlignment为åï¼æªè®¾ç½®å为0ï¼è¡¨ç¤ºå±
ä¸å¯¹é½ï¼å¼å¯ä¸ºï¼0ã1ã2ï¼åå«è¡¨ç¤ºå·¦ãä¸ãå³å¯¹é½; |
| | | * @param {0|1|2} data.verticalAlignment åç¬¦ä¸²å¨æå®ç宽é«èå´å
çåç´å¯¹é½æ¹å¼ï¼é»è®¤ä»¥setItemVerticalAlignment为åï¼æªè®¾ç½®å为0ï¼è¡¨ç¤ºå±
ä¸å¯¹é½ï¼å¼å¯ä¸ºï¼0ã1ã2ï¼åå«è¡¨ç¤ºä¸ãä¸ãä¸å¯¹é½; |
| | | * |
| | | */ |
| | | drawText(data) { |
| | | return request("drawText", data); |
| | | }, |
| | | /** |
| | | * ç»å¶ä¸ç»´ç ï¼ |
| | | * @param {{}} data ä¸ç»´ç ç»å¶åæ°ï¼ |
| | | * @param {string} data.text, ä¸ç»´ç å
容 |
| | | * @param {number} data.x, ä¸ç»´ç å¨åæ ç³»Xè½´ä¸çä½ç½®ï¼ |
| | | * @param {number} data.y, ä¸ç»´ç å¨åæ ç³»ä¸Yè½´ä¸çä½ç½®ï¼ |
| | | * @param {number} data.width, ä¸ç»´ç å¨åæ ç³»ä¸çå®½åº¦ï¼ |
| | | * @param {number} data.height, ä¸ç»´ç é«åº¦ï¼ |
| | | * @param {number} data.textHeight, ä¸ç»´ç ä¸é¢æ¾ç¤ºçå符串é«åº¦ï¼ä¸éè¦çè¯å¯ä»¥è®¾ç½®ä½0ï¼ |
| | | * @param {number} data.type ä¸ç»´ç ç±»åï¼{@link BarcodeType} |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼ |
| | | * @param {0|1|2} data.horizontalAlignment åç¬¦ä¸²å¨æå®ç宽é«èå´å
çæ°´å¹³å¯¹é½æ¹å¼ï¼é»è®¤ä»¥setItemHorizontalAlignment为åï¼æªè®¾ç½®å为0ï¼è¡¨ç¤ºå±
ä¸å¯¹é½ï¼å¼å¯ä¸ºï¼0ã1ã2ï¼åå«è¡¨ç¤ºå·¦ãä¸ãå³å¯¹é½; |
| | | * @param {0|1|2} data.verticalAlignment åç¬¦ä¸²å¨æå®ç宽é«èå´å
çåç´å¯¹é½æ¹å¼ï¼é»è®¤ä»¥setItemVerticalAlignment为åï¼æªè®¾ç½®å为0ï¼è¡¨ç¤ºå±
ä¸å¯¹é½ï¼å¼å¯ä¸ºï¼0ã1ã2ï¼åå«è¡¨ç¤ºä¸ãä¸ãä¸å¯¹é½; |
| | | * |
| | | * @typedef{{ |
| | | * UPC_A: 20, |
| | | * UPC_E: 21, |
| | | * EAN13: 22, |
| | | * EAN8: 23, |
| | | * CODE39: 24, |
| | | * ITF25: 25, |
| | | * CODABAR: 26, |
| | | * CODE93: 27, |
| | | * CODE128: 28, |
| | | * ISBN: 29, |
| | | * ECODE39: 30, |
| | | * AUTO: 60, |
| | | * }} BarcodeType ä¸ç»´ç ç±»å |
| | | */ |
| | | draw1DBarcode(data) { |
| | | return request("draw1DBarcode", data); |
| | | }, |
| | | /** |
| | | * ç»å¶äºç»´ç ï¼ |
| | | * @param {{}} data |
| | | * @param {string} data.text äºç»´ç å
容 |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½® |
| | | * @param {number} data.width äºç»´ç 大å°(å使¯«ç±³) |
| | | * @param {0|1|2|3} data.eccLevel äºç»´ç çº é级å«ï¼0|1|2|3åå«è¡¨ç¤º: L(ä½)|M(ä¸)|Q(强)|H(é«)ï¼é»è®¤ä¸º0ï¼è¡¨ç¤ºæä½çº éçº§å« |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | * @param {0|1|2} data.horizontalAlignment åç¬¦ä¸²å¨æå®ç宽é«èå´å
çæ°´å¹³å¯¹é½æ¹å¼ï¼é»è®¤ä»¥setItemHorizontalAlignment为åï¼æªè®¾ç½®å为0ï¼è¡¨ç¤ºå±
ä¸å¯¹é½ï¼å¼å¯ä¸ºï¼0ã1ã2ï¼åå«è¡¨ç¤ºå·¦ãä¸ãå³å¯¹é½; |
| | | * @param {0|1|2} data.verticalAlignment åç¬¦ä¸²å¨æå®ç宽é«èå´å
çåç´å¯¹é½æ¹å¼ï¼é»è®¤ä»¥setItemVerticalAlignment为åï¼æªè®¾ç½®å为0ï¼è¡¨ç¤ºå±
ä¸å¯¹é½ï¼å¼å¯ä¸ºï¼0ã1ã2ï¼åå«è¡¨ç¤ºä¸ãä¸ãä¸å¯¹é½; |
| | | */ |
| | | draw2DQRCode(data) { |
| | | return request("draw2DQRCode", data); |
| | | }, |
| | | /** |
| | | * ç»å¶PDF417ç ï¼ |
| | | * @param {{}} data PDF417æå°åæ°ï¼ |
| | | * @param {string} data.text æå°å
容 |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | */ |
| | | // draw2DPdf417(data) { |
| | | // return request("draw2DPdf417", data); |
| | | // }, |
| | | /** |
| | | * ç»å¶ç©å½¢æ¡ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {number} data.lineWidth è¾¹æ¡å®½åº¦(å使¯«ç±³)ï¼é»è®¤ä¸º0.4mm |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | drawRectangle(data) { |
| | | return request("drawRectangle", data); |
| | | }, |
| | | /** |
| | | * ç»å¶å¡«å
ç©å½¢ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | fillRectangle(data) { |
| | | return request("fillRectangle", data); |
| | | }, |
| | | /** |
| | | * ç»å¶åè§ç©å½¢æ¡ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {number} data.cornerWidth åè§åå¾(å使¯«ç±³) |
| | | * @param {number} data.cornerHeight åè§åå¾(å使¯«ç±³) |
| | | * @param {number} data.lineWidth è¾¹æ¡å®½åº¦(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | drawRoundRectangle(data) { |
| | | return request("drawRoundRectangle", data); |
| | | }, |
| | | /** |
| | | * å¡«å
åè§ç©å½¢ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {number} data.cornerWidth åè§åå¾(å使¯«ç±³) |
| | | * @param {number} data.cornerHeight åè§åå¾(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | fillRoundRectangle(data) { |
| | | return request("fillRoundRectangle", data); |
| | | }, |
| | | /** |
| | | * ç»å¶æ¤åï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {number} data.lineWidth è¾¹æ¡å®½åº¦(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | drawEllipse(data) { |
| | | return request("drawEllipse", data); |
| | | }, |
| | | /** |
| | | * å¡«å
æ¤åï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | fillEllipse(data) { |
| | | return request("fillEllipse", data); |
| | | }, |
| | | /** |
| | | * ç»å¶åå½¢ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x åå¿Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y åå¿Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.radius ååå¾(å使¯«ç±³) |
| | | * @param {number} data.lineWidth è¾¹æ¡å®½åº¦(å使¯«ç±³) |
| | | */ |
| | | drawCircle(data) { |
| | | return request("drawCircle", data); |
| | | }, |
| | | /** |
| | | * å¡«å
åï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x åå¿Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y åå¿Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.radius ååå¾(å使¯«ç±³) |
| | | */ |
| | | fillCircle(data) { |
| | | return request("fillCircle", data); |
| | | }, |
| | | /** |
| | | * ç»å¶ç´çº¿ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x1 èµ·ç¹Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y1 èµ·ç¹Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.x2 ç»ç¹Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y2 ç»ç¹Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.lineWidth 线æ¡å®½åº¦(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | drawLine(data) { |
| | | return request("drawLine", data); |
| | | }, |
| | | /** |
| | | * ç»å¶èçº¿ï¼ |
| | | * @param {{}} data |
| | | * @param {number} data.x1 èµ·ç¹Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y1 èµ·ç¹Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.x2 ç»ç¹Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y2 ç»ç¹Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.dashLen[], çµè¯çº¿çº¿æ®µé¿åº¦æ°ç»(å使¯«ç±³) |
| | | * @param {number} data.lineWidth 线æ¡å®½åº¦(å使¯«ç±³) |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | drawDashLine(data) { |
| | | return request("drawDashLine", data); |
| | | }, |
| | | /** |
| | | * ç»å¶å¾çï¼ |
| | | * @param {{}} data |
| | | * @param {string} data.image |
| | | * @param {number} data.x Xè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.y Yè½´åæ ä½ç½®(å使¯«ç±³) |
| | | * @param {number} data.width ç»å¶æ°æ®å
容ç宽度(å使¯«ç±³) |
| | | * @param {number} data.height ç»å¶æ°æ®å
容çé«åº¦(å使¯«ç±³) |
| | | * @param {number} data.threshold é»ç½è½¬æ¢éå¼ï¼é»è®¤æ¯192 |
| | | * @param {0|90|180|270} data.orientation å符串æè½¬æ¹åï¼é»è®¤ä»¥setItemOrientation为åï¼å¦ææªè°ç¨è¯¥å½æ°ï¼å为0ï¼è¡¨ç¤ºä¸è¿è¡ä»»ä½æè½¬ï¼ |
| | | */ |
| | | drawImage(data) { |
| | | return request("drawImage", data); |
| | | }, |
| | | }; |
| | | |
| | | export default lpapi; |