From ebbe758df90e7049a859317c8055a7f81ca3422f Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 08 五月 2025 16:17:01 +0800
Subject: [PATCH] 1.采购到货功能开发2.新增采购入库菜单、入库检验菜单
---
config/api.js | 60
pages/grzx/mmsz.vue | 6
pages/wlgl/qtck.vue | 49
pages/wlgl/blps.vue | 49
pages/wlgl/kcpd.vue | 49
pages/xtsy/index.vue | 14
pages/wlgl/scrk.vue | 1807 ++++++++++++++++++
pages/wlgl/qtll.vue | 49
pages/wlgl/cgrk2.vue | 0
pages/wlgl/fgll.vue | 49
static/js/lpapi-uniplugin.js | 485 +++++
main.js | 22
pages/wlgl/sctl.vue | 49
pages/wlgl/cgrk3.vue | 0
pages/wlgl/wltb.vue | 49
pages.json | 67
pages/zlgl/rcjy.vue | 515 +++++
pages/zlgl/rcjy3.vue | 338 +++
pages/wlgl/cgdh3.vue | 1118 +++++++++++
pages/wlgl/zhrq.vue | 49
pages/wlgl/cgdh.vue | 81
pages/wlgl/cgdh2.vue | 155 +
pages/wlgl/scck.vue | 49
pages/wlgl/cgrk.vue | 0
pages/wlgl/qtrk.vue | 49
pages/zlgl/rcjy2.vue | 499 +++++
pages/wlgl/scll.vue | 49
27 files changed, 5,700 insertions(+), 6 deletions(-)
diff --git a/config/api.js b/config/api.js
index f5ba104..1a7486c 100644
--- a/config/api.js
+++ b/config/api.js
@@ -325,4 +325,62 @@
// 瀵嗙爜閲嶇疆
export const ResettUserPassword = (data) => http.post('/Login/ResettUserPassword' +
- data)
\ No newline at end of file
+ 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)
\ No newline at end of file
diff --git a/main.js b/main.js
index 90e595b..2cb36f0 100644
--- a/main.js
+++ b/main.js
@@ -18,12 +18,21 @@
...App
})
-Vue.prototype.$appVersion = 'v1.0.3' //APP褰撳墠鐗堟湰
+// Vue.prototype.$appVersion = 'v1.0.3' //APP褰撳墠鐗堟湰 //鍦f玻鐗堟湰
+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' //鍦f玻椤圭洰
+// Vue.prototype.$baseUrl = 'http://121.196.36.24:8032/api' //鍦f玻椤圭洰
// Vue.prototype.$baseUrl = 'http://192.168.2.254:8000/api' //鍦f玻椤圭洰 瀹㈡埛鐜板満瀹為檯鏈嶅姟鍣╥p
+
+// Vue.prototype.$baseUrl = 'http://121.196.36.24:8039/api' //澶у矝椤圭洰锛�2.0锛�
+// Vue.prototype.$baseUrl = 'http://192.168.2.138:8080/api' //澶у矝椤圭洰锛�2.0锛� 瀹㈡埛鐜板満瀹為檯鏈嶅姟鍣╥p
+
+
+Vue.prototype.$baseUrl = 'http://121.196.36.24:9090/api' //鏈�鏂颁骇鍝� 2025/5/8
+
+
Vue.prototype.$companyType = 'B' //浼佷笟绫诲瀷锛堥」鐩被鍨嬶級 A锛氬法鍔涳紝B锛氬湥娌o紝銆丅: 浜у搧
// A: http://121.196.36.24:8021/api http://122.227.18.22:8000/api
@@ -32,6 +41,15 @@
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)
diff --git a/pages.json b/pages.json
index a7eb353..0dd6ebc 100644
--- a/pages.json
+++ b/pages.json
@@ -382,6 +382,73 @@
"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": {
diff --git a/pages/grzx/mmsz.vue b/pages/grzx/mmsz.vue
index 192cfb9..b31b20b 100644
--- a/pages/grzx/mmsz.vue
+++ b/pages/grzx/mmsz.vue
@@ -25,13 +25,13 @@
</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>
diff --git a/pages/wlgl/blps.vue b/pages/wlgl/blps.vue
new file mode 100644
index 0000000..dcac26f
--- /dev/null
+++ b/pages/wlgl/blps.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/cgdh.vue b/pages/wlgl/cgdh.vue
new file mode 100644
index 0000000..ab5e6af
--- /dev/null
+++ b/pages/wlgl/cgdh.vue
@@ -0,0 +1,81 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/cgdh2.vue b/pages/wlgl/cgdh2.vue
new file mode 100644
index 0000000..ca5e69c
--- /dev/null
+++ b/pages/wlgl/cgdh2.vue
@@ -0,0 +1,155 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/cgdh3.vue b/pages/wlgl/cgdh3.vue
new file mode 100644
index 0000000..bdcc506
--- /dev/null
+++ b/pages/wlgl/cgdh3.vue
@@ -0,0 +1,1118 @@
+<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="姝e湪鎻愪氦,璇风◢绛�..." 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瀛恑t
+
+ // 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(閮ㄥ垎鍒拌揣)銆両NARIVE(宸插埌璐�)
+ 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>
\ No newline at end of file
diff --git a/pages/wlgl/cgrk.vue b/pages/wlgl/cgrk.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pages/wlgl/cgrk.vue
diff --git a/pages/wlgl/cgrk2.vue b/pages/wlgl/cgrk2.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pages/wlgl/cgrk2.vue
diff --git a/pages/wlgl/cgrk3.vue b/pages/wlgl/cgrk3.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pages/wlgl/cgrk3.vue
diff --git a/pages/wlgl/fgll.vue b/pages/wlgl/fgll.vue
new file mode 100644
index 0000000..5d05241
--- /dev/null
+++ b/pages/wlgl/fgll.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/kcpd.vue b/pages/wlgl/kcpd.vue
new file mode 100644
index 0000000..8229294
--- /dev/null
+++ b/pages/wlgl/kcpd.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/qtck.vue b/pages/wlgl/qtck.vue
new file mode 100644
index 0000000..b173e14
--- /dev/null
+++ b/pages/wlgl/qtck.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/qtll.vue b/pages/wlgl/qtll.vue
new file mode 100644
index 0000000..87b8bf3
--- /dev/null
+++ b/pages/wlgl/qtll.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/qtrk.vue b/pages/wlgl/qtrk.vue
new file mode 100644
index 0000000..0ef60c8
--- /dev/null
+++ b/pages/wlgl/qtrk.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/scck.vue b/pages/wlgl/scck.vue
new file mode 100644
index 0000000..f91c94a
--- /dev/null
+++ b/pages/wlgl/scck.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/scll.vue b/pages/wlgl/scll.vue
new file mode 100644
index 0000000..9bbc500
--- /dev/null
+++ b/pages/wlgl/scll.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/scrk.vue b/pages/wlgl/scrk.vue
new file mode 100644
index 0000000..be8f589
--- /dev/null
+++ b/pages/wlgl/scrk.vue
@@ -0,0 +1,1807 @@
+<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="姝e湪鎻愪氦,璇风◢绛�..." 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
+ })
+ })
+
+ // 褰揻lag涓簄ull鏃� 涓烘棤婧愬崟 鍙嶄箣 涓烘湁婧愬崟
+ 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, // 鏉ユ簮鍗曟嵁鐨勫崟鎹甀D
+ BaseQuantity: i.stinhouseqty, // 涓昏閲忓崟浣嶆暟閲�
+ SourceVoucherDetailId: i
+ .sourceVoucherDetailId, // 鏉ユ簮鍗曟嵁鐨勫搴旀槑缁咺D
+ 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
+ })
+ })
+
+
+
+
+ // 褰揻lag涓簄ull鏃� 涓烘棤婧愬崟 鍙嶄箣 涓烘湁婧愬崟
+ 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, // 鏉ユ簮鍗曟嵁鐨勫崟鎹甀D
+ BaseQuantity: i.stinhouseqty, // 涓昏閲忓崟浣嶆暟閲�
+ SourceVoucherDetailId: i
+ .sourceVoucherDetailId, // 鏉ユ簮鍗曟嵁鐨勫搴旀槑缁咺D
+ 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>
\ No newline at end of file
diff --git a/pages/wlgl/sctl.vue b/pages/wlgl/sctl.vue
new file mode 100644
index 0000000..9923516
--- /dev/null
+++ b/pages/wlgl/sctl.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/wltb.vue b/pages/wlgl/wltb.vue
new file mode 100644
index 0000000..6618e2a
--- /dev/null
+++ b/pages/wlgl/wltb.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/wlgl/zhrq.vue b/pages/wlgl/zhrq.vue
new file mode 100644
index 0000000..87ed5f0
--- /dev/null
+++ b/pages/wlgl/zhrq.vue
@@ -0,0 +1,49 @@
+<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>
\ No newline at end of file
diff --git a/pages/xtsy/index.vue b/pages/xtsy/index.vue
index 2947384..044eb60 100644
--- a/pages/xtsy/index.vue
+++ b/pages/xtsy/index.vue
@@ -203,6 +203,9 @@
// 璐ㄩ噺绠$悊
+ case '2701':
+ url = 'zlgl/rcjy' //鍏ュ巶妫�楠�
+ break;
case '2702':
url = 'zlgl/sjjy' //棣栨妫�楠�
break;
@@ -212,6 +215,7 @@
case '2704':
url = 'zlgl/wgjy' //瀹屽伐妫�楠�
break;
+
// 璁惧绠$悊
@@ -405,6 +409,16 @@
case '2104':
url = 'znfx/scjd' //鐢熶骇杩涘害
break;
+
+
+ // 鐗╂枡绠$悊
+ case '2600':
+ url = 'wlgl/cgdh' //閲囪喘鍒拌揣
+ break;
+ case '2601':
+ url = 'wlgl/cgrk' //閲囪喘鍏ュ簱
+ break;
+
}
this.popupShow = false //浜岀骇鑿滃崟鐨勬樉闅愭帶鍒�
console.log(url)
diff --git a/pages/zlgl/rcjy.vue b/pages/zlgl/rcjy.vue
new file mode 100644
index 0000000..56383e1
--- /dev/null
+++ b/pages/zlgl/rcjy.vue
@@ -0,0 +1,515 @@
+<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>
\ No newline at end of file
diff --git a/pages/zlgl/rcjy2.vue b/pages/zlgl/rcjy2.vue
new file mode 100644
index 0000000..59d5d8b
--- /dev/null
+++ b/pages/zlgl/rcjy2.vue
@@ -0,0 +1,499 @@
+<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>
\ No newline at end of file
diff --git a/pages/zlgl/rcjy3.vue b/pages/zlgl/rcjy3.vue
new file mode 100644
index 0000000..06d48aa
--- /dev/null
+++ b/pages/zlgl/rcjy3.vue
@@ -0,0 +1,338 @@
+<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="姝e湪鎻愪氦,璇风◢绛�..." 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>
\ No newline at end of file
diff --git a/static/js/lpapi-uniplugin.js b/static/js/lpapi-uniplugin.js
new file mode 100644
index 0000000..13a8d1b
--- /dev/null
+++ b/static/js/lpapi-uniplugin.js
@@ -0,0 +1,485 @@
+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", {});
+ },
+ /**
+ * 鑾峰彇褰撳墠宸茶繛鎺ユ墦鍗版満淇℃伅锛�
+ * 璋冪敤璇ユ帴鍙e墠瑕佺‘淇濇墦鍗版満宸茶繛鎺ワ紱
+ */
+ 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 瀛楃涓查暱搴﹁秴杩噖idth涔嬪悗锛屾槸鍚﹁嚜鍔ㄦ崲琛岋紵榛樿浣峵rue;
+ * @param {0|90|180|270} data.orientation 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负0锛�
+ * @param {0|1|2} data.horizontalAlignment 瀛楃涓插湪鎸囧畾鐨勫楂樿寖鍥村唴鐨勬按骞冲榻愭柟寮忥紝榛樿浠etItemHorizontalAlignment涓哄噯锛屾湭璁剧疆鍒欎负0锛岃〃绀哄眳涓婂榻愶紝鍊煎彲涓猴細0銆�1銆�2锛屽垎鍒〃绀哄乏銆佷腑銆佸彸瀵归綈;
+ * @param {0|1|2} data.verticalAlignment 瀛楃涓插湪鎸囧畾鐨勫楂樿寖鍥村唴鐨勫瀭鐩村榻愭柟寮忥紝榛樿浠etItemVerticalAlignment涓哄噯锛屾湭璁剧疆鍒欎负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, 涓�缁寸爜鍦ㄥ潗鏍囩郴涓璝杞翠笂鐨勪綅缃紱
+ * @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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负0锛�
+ * @param {0|1|2} data.horizontalAlignment 瀛楃涓插湪鎸囧畾鐨勫楂樿寖鍥村唴鐨勬按骞冲榻愭柟寮忥紝榛樿浠etItemHorizontalAlignment涓哄噯锛屾湭璁剧疆鍒欎负0锛岃〃绀哄眳涓婂榻愶紝鍊煎彲涓猴細0銆�1銆�2锛屽垎鍒〃绀哄乏銆佷腑銆佸彸瀵归綈;
+ * @param {0|1|2} data.verticalAlignment 瀛楃涓插湪鎸囧畾鐨勫楂樿寖鍥村唴鐨勫瀭鐩村榻愭柟寮忥紝榛樿浠etItemVerticalAlignment涓哄噯锛屾湭璁剧疆鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负0锛岃〃绀轰笉杩涜浠讳綍鏃嬭浆锛�
+ * @param {0|1|2} data.horizontalAlignment 瀛楃涓插湪鎸囧畾鐨勫楂樿寖鍥村唴鐨勬按骞冲榻愭柟寮忥紝榛樿浠etItemHorizontalAlignment涓哄噯锛屾湭璁剧疆鍒欎负0锛岃〃绀哄眳涓婂榻愶紝鍊煎彲涓猴細0銆�1銆�2锛屽垎鍒〃绀哄乏銆佷腑銆佸彸瀵归綈;
+ * @param {0|1|2} data.verticalAlignment 瀛楃涓插湪鎸囧畾鐨勫楂樿寖鍥村唴鐨勫瀭鐩村榻愭柟寮忥紝榛樿浠etItemVerticalAlignment涓哄噯锛屾湭璁剧疆鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负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 瀛楃涓叉棆杞柟鍚戯紵榛樿浠etItemOrientation涓哄噯锛涘鏋滄湭璋冪敤璇ュ嚱鏁帮紝鍒欎负0锛岃〃绀轰笉杩涜浠讳綍鏃嬭浆锛�
+ */
+ drawImage(data) {
+ return request("drawImage", data);
+ },
+};
+
+export default lpapi;
\ No newline at end of file
--
Gitblit v1.9.3