From a9ad3a659b6bdffee1792ca67347fdb9a1b65c72 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 01 九月 2025 10:37:11 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue | 357 ++
pages/index/tab2.vue | 48
pages/xiaoshouchuku/form.vue | 3164 +++++++++---------
pages/xiaoshoutuihuo/form.vue | 40
pages/saomachuku/table.vue | 934 +++++
pages/weiwairuku/form.vue | 1650 +++++++++
utils/common.js | 9
pages/weiwailingliao/form.vue | 44
pages/shouliaotongzhi/table_son.vue | 13
components/labelPrinterComponent/labelPrinterComponent.vue | 16
pages/caigouruku/form.vue | 80
pages/index/index.vue | 1051 +++---
pages/shengchanbuliao/form.vue | 40
pages/weiwairuku/table.vue | 495 ++
pages/shengchanlingliaoshengdan/form.vue | 40
pages/zhijiediaobo/form.vue | 44
pages/shengchanrukushengdan/form.vue | 44
pages.json | 53
pages/qitaruku_v2/form.vue | 44
pages/caigoutuiliao/form.vue | 40
pages/qitachuku_v2/form.vue | 4
manifest.json | 4
pages/tiaomaguanli/table.vue | 266 +
pages/tiaomaguanli/table_son.vue | 1007 ++++++
components/blueToothConnector/blueToothConnector.vue | 4
pages/tiaomachaima/tiaomachaima2.vue | 497 ++
26 files changed, 7,835 insertions(+), 2,153 deletions(-)
diff --git a/components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue b/components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue
new file mode 100644
index 0000000..8324aa4
--- /dev/null
+++ b/components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue
@@ -0,0 +1,357 @@
+<template>
+ <view>
+ <uni-popup ref="popup" type="bottom" @change="popupChangeHandler">
+ <view class="content">
+ <view class="search-condition">
+ <view class="title"><text>鍑哄簱閫氱煡鍗曞彿: </text></view>
+ <view class="right"><input type="text" v-model="HBillNo" /></view>
+ </view>
+ <view class="search-condition">
+ <view class="title"><text>瀹㈡埛: </text></view>
+ <view class="right"><input type="text" v-model="HCustomer" /></view>
+ </view>
+ <view class="search-condition">
+ <view class="title"><text>閿�鍞憳: </text></view>
+ <view class="right"><input type="text" v-model="HSeller" /></view>
+ </view>
+ <view class="search-condition">
+ <view class="title">
+ 鏉$爜:
+ </view>
+ <view class="right">
+ <input type="text" v-model="HBarCode" @confirm="getCode(HBarCode)" />
+ </view>
+ <view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanCode"></uni-icons>
+ </view>
+ </view>
+ <view class="buttons">
+ <view style="flex: 1;"></view>
+ <button size="mini" type="primary" @click="clear">閲嶇疆</button>
+ <button size="mini" type="primary" @click="search">鎼滅储</button>
+ <button size="mini" type="primary" @click="exit">閫�鍑�</button>
+ </view>
+ <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;">
+ <view class="options-wrapper" v-show="HBillList.length != 0">
+ <uni-card class="option-card" v-for="(bill, index) in HBillList[curPage-1]" :key="index"
+ :title="bill['鐗╂枡鍚嶇О']" @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'])">
+ <view class="item">
+ <view class="left">鍙戣揣閫氱煡鍗曞彿: </view>
+ <view class="right">{{bill['鍗曟嵁鍙�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鐗╂枡浠g爜: </view>
+ <view class="right">{{bill['鐗╂枡浠g爜']}}</view>
+ </view>
+ <!-- <view class="item">
+ <view class="left">鐗╂枡鍚嶇О: </view>
+ <view class="right">{{}}</view>
+ </view> -->
+ <view class="item">
+ <view class="left">瑙勬牸鍨嬪彿: </view>
+ <view class="right">{{bill['瑙勬牸鍨嬪彿']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">閿�鍞憳: </view>
+ <view class="right">{{bill['閿�鍞憳']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">瀹㈡埛: </view>
+ <view class="right">{{bill['瀹㈡埛']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鍙戣揣閫氱煡鍗曟暟閲�: </view>
+ <view class="right">{{bill['鏁伴噺']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鍓╀綑鍙嚭搴撴暟閲�: </view>
+ <view class="right">{{bill['鏁伴噺'] - bill['宸插叧鑱旀暟閲�']}}</view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-show="HBillList.length == 0">鏆傛棤鏁版嵁</view>
+ </scroll-view>
+ <uni-pagination id="#pagination" title="鏍囬鏂囧瓧" v-model="curPage" :pageSize="size"
+ :total="length"></uni-pagination>
+ </view>
+
+ </uni-popup>
+ </view>
+</template>
+
+<script>
+ import {
+ CommonUtils
+ } from '../../utils/common';
+ import {
+ getUserInfo
+ } from '../../utils/auth';
+ export default {
+ name: "PushSeOutStockBillPopup",
+ data() {
+ return {
+ size: 20,
+ curPage: 1,
+ length: 0,
+ page: 0,
+ HSourceBillNo: '',
+ HMater: '',
+ HCustom: '',
+ HBillList: [],
+ panelHeight: 0,
+ HBarCode: '',
+ HBillNo: '',
+ HCustomer: '',
+ HSeller: '',
+ HMaterialID: ''
+ };
+ },
+ props: {
+ HBillType: {
+ type: [String, Number],
+ required: true
+ },
+ HSourceBillType: {
+ type: [String, Number],
+ required: true
+ },
+ HStockOrgID: {
+ type: [String, Number],
+ required: true
+ },
+ },
+ model: {
+ prop: "HSourceBill",
+ event: 'change'
+ },
+ methods: {
+ clear() {
+ this.HBarCode = ''
+ this.HMaterialID = '',
+ this.HBillNo = '',
+ this.HCustom = '',
+ this.HSeller = '',
+ this.search()
+ },
+ popupChangeHandler(e) {
+ if (e.show === true) {
+ this.getBillList()
+ } else {
+ // 娓呯悊璧勬簮
+ this.size = 20
+ this.curPage = 1
+ this.length = 0
+ this.page = 0
+ this.HSourceBillNo = ''
+ this.HMater = ''
+ this.HCustom = ''
+ this.HBillList = []
+ }
+ },
+ exit() {
+ this.$refs.popup.close();
+ },
+ search() {
+ this.getBillList()
+ },
+ showPopup() {
+ this.$refs.popup.open();
+ },
+ clickCard(interid, billno) {
+ uni.$emit('BillSelectComplete', {
+ HInterID: interid,
+ HBillNo: billno
+ })
+ // this.exit()
+ },
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ this.HBarCode = ret.resp_result
+ this.getCode(ret.resp_result)
+ })
+ },
+ async getCode(BarCode) {
+ console.log(BarCode)
+ try {
+ let barCodeMeta = await this.getMaterialInfo(BarCode)
+ console.log('barCodeMeta: ', barCodeMeta);
+ this.HMaterialID = barCodeMeta[0]['HMaterID']
+ // this.getMater()
+ console.log('鎵ц: getMater')
+ this.getBillList()
+ } catch (err) {
+ return
+ }
+ },
+ async getMaterialInfo(BarCode) {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/Gy_BarCodeBillList/GetBarCodeBillList",
+ data: {
+ sWhere: ` and 鏉$爜缂栧彿 = N'${BarCode}'`,
+ user: getUserInfo()['Czymc']
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message,
+ data
+ } = res.data
+ if (count == 1) {
+ resolve(data)
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ reject()
+ }
+ },
+ errFunction: () => {
+ reject()
+ }
+ })
+ })
+ },
+ getBillList() {
+ this.HBillList = []
+ this.length = 0
+ this.page = 0
+ this.curPage = 1
+
+ let sWhere = ' and 鏁伴噺 > 宸插叧鑱旀暟閲�'
+ if (!CommonUtils.isEmpty(this.HMaterialID)) {
+ sWhere += ` and HMaterID = ${this.HMaterialID} `
+ }
+
+ if (!CommonUtils.isEmpty(this.HBillNo)) {
+ sWhere += ` and 鍗曟嵁鍙� like N'%${this.HMaterialID}%'`
+ }
+ if (!CommonUtils.isEmpty(this.HCustomer)) {
+ sWhere += ` and 瀹㈡埛 like N'%${this.HCustomer}%'`
+ }
+ if (!CommonUtils.isEmpty(this.HSeller)) {
+ sWhere += ` and 涓氬姟鍛� like N'%${this.HSeller}%'`
+ }
+
+ CommonUtils.doRequest2({
+ url: '/Xs_SeOutStockBill/list',
+ data: {
+ 'user': getUserInfo()['Czymc'],
+ 'sWhere': sWhere
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ console.log('Xs_SeOutStockBill data: ', data);
+ this.length = Array.from(data).length
+ const result = [];
+ for (let i = 0; i < data.length; i += this.size) {
+ result.push(data.slice(i, i + this.size));
+ }
+ this.HBillList = result
+ this.page = result.length
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ },
+ }
+</script>
+
+<style lang="scss">
+ .content {
+ box-sizing: border-box;
+ border-radius: 15rpx 15rpx 0 0;
+ padding: 20rpx 20rpx 40rpx 20rpx;
+ background-color: #fff;
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+
+ .search-condition {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ padding: 0 10rpx;
+ gap: 20rpx;
+
+ .title {
+ width: 6rem;
+ text-align: right;
+ font-size: 32rpx;
+ }
+
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ height: auto;
+
+ input {
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 24rpx;
+ }
+ }
+ }
+
+ .buttons {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ justify-content: flex-end;
+
+ >button {
+ display: inline-flex;
+ width: 4rem;
+ }
+ }
+
+ .options-wrapper {
+ padding: 20rpx;
+ display: grid;
+ grid-template-columns: repeat(1, 1fr);
+ gap: 20rpx;
+
+ .option-card {
+ margin: 0 !important;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ gap: 10rpx;
+
+ .item {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ gap: 10rpx;
+
+ .right {
+ flex-wrap: wrap;
+ word-break: break-all;
+ }
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/components/blueToothConnector/blueToothConnector.vue b/components/blueToothConnector/blueToothConnector.vue
index d642203..ce6052b 100644
--- a/components/blueToothConnector/blueToothConnector.vue
+++ b/components/blueToothConnector/blueToothConnector.vue
@@ -202,14 +202,12 @@
})
// console.log("msg: " + cmd);
let toast = (msg) => {
+ uni.hideLoading()
uni.showToast({
icon: 'none',
title: msg,
duration: 2000
})
- setTimeout(() => {
- uni.hideLoading()
- }, 3000)
}
let that = this
return new Promise((resolve, reject) => {
diff --git a/components/labelPrinterComponent/labelPrinterComponent.vue b/components/labelPrinterComponent/labelPrinterComponent.vue
index 265380b..e3ff7b3 100644
--- a/components/labelPrinterComponent/labelPrinterComponent.vue
+++ b/components/labelPrinterComponent/labelPrinterComponent.vue
@@ -101,11 +101,17 @@
}
for(let binary of binarys){
- let sendSuccess = await this.$refs.bt2.sendMessage(binary);
- console.log("鍙戦�佹槸鍚︽垚鍔燂細 ", sendSuccess)
- if(sendSuccess === false) {
- return
- }
+ try{
+ let sendSuccess = await this.$refs.bt2.sendMessage(binary);
+ console.log("鍙戦�佹槸鍚︽垚鍔燂細 ", sendSuccess)
+ if(sendSuccess === false) {
+ return
+ }
+ }catch {
+ // 鏂紑钃濈墮杩炴帴
+ this.$refs.bt2.closeBluetooth()
+ }
+
}
},
async execPrint() {
diff --git a/manifest.json b/manifest.json
index 534f458..2407bda 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "鏅轰簯LMES",
"appid" : "__UNI__B002F49",
"description" : "",
- "versionName" : "1.0.62",
- "versionCode" : 162,
+ "versionName" : "1.0.63",
+ "versionCode" : 163,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
diff --git a/pages.json b/pages.json
index 0e06eac..6b49cf5 100644
--- a/pages.json
+++ b/pages.json
@@ -1,8 +1,7 @@
{
- "pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages
- {
- "path": "pages/index/login",
-
+ "pages": [ //pages鏁扮粍涓涓�椤硅〃绀哄簲鐢ㄥ惎鍔ㄩ〉锛屽弬鑰冿細https://uniapp.dcloud.io/collocation/pages
+ {
+ "path": "pages/index/login",
"style": {
"navigationBarTitleText": "鐧诲綍",
"navigationStyle": "custom"
@@ -410,6 +409,12 @@
}
},
{
+ "path": "pages/tiaomachaima/tiaomachaima2",
+ "style": {
+ "navigationBarTitleText": "鏉$爜鎷嗙爜2"
+ }
+ },
+ {
"path": "pages/wuliaosaoma/wuliaosaoma",
"style": {
"navigationBarTitleText": "鐗╂枡娓呭崟"
@@ -732,15 +737,37 @@
{
"navigationBarTitleText" : "淇敼瀵嗙爜"
}
- },
- {
- "path" : "pages/jishikucunchaxun/table",
- "style" :
- {
- "navigationBarTitleText" : "ERP鍙婃椂搴撳瓨鏌ヨ"
- // "enablePullDownRefresh": true
- }
- }
+ },{
+ "path": "pages/jishikucunchaxun/table",
+ "style": {
+ "navigationBarTitleText": "ERP鍙婃椂搴撳瓨鏌ヨ"
+ // "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path": "pages/weiwairuku/table",
+ "style": {
+ "navigationBarTitleText": "濮斿鍏ュ簱"
+ }
+ },
+ {
+ "path": "pages/weiwairuku/form",
+ "style": {
+ "navigationBarTitleText": "濮斿鍏ュ簱鍗�"
+ }
+ },
+ {
+ "path": "pages/tiaomaguanli/table",
+ "style": {
+ "navigationBarTitleText": "鏉$爜绠$悊"
+ }
+ },
+ {
+ "path": "pages/tiaomaguanli/table_son",
+ "style": {
+ "navigationBarTitleText": "鏉$爜鐢熸垚"
+ }
+ }
],
"tabBar": {
"color": "#888888", //tab 涓婄殑鏂囧瓧榛樿棰滆壊锛屼粎鏀寔鍗佸叚杩涘埗棰滆壊
diff --git a/pages/caigouruku/form.vue b/pages/caigouruku/form.vue
index 6bf8206..3427434 100644
--- a/pages/caigouruku/form.vue
+++ b/pages/caigouruku/form.vue
@@ -274,6 +274,10 @@
HPageTitle: '閲囪喘鍏ュ簱鍗�',
+ materMeta: [
+
+ ],
+
showHStockPlaceName: false,
showHMainSourceBillType: true,
showHSourceBillNo: true,
@@ -1050,7 +1054,7 @@
this.hform.HSourceBillNo = data.hSourceBillNoField
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1077,6 +1081,7 @@
this.showHSupName = false
this.tabs = 2
} else { //鐗╂枡鏉$爜
+ this.materMeta.push(data)
this.tabs = 2
if (!this.hform.HSourceBillNo) {
this.hform.HSupName = data.hSupNameField
@@ -1090,7 +1095,7 @@
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
this.hform.HMainSourceBillType = data.hSourceBillTypeField
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1156,6 +1161,7 @@
console.log('鐗╂枡', res.data)
if (res.data.count == 1) {
var data = res.data.data
+ this.materMeta = data.BarCodeDetailslist
this.Materlist = data.Materlist
if (!data.BarCodeDetailslist[0].HBarCode) {
this.hform.HMaterName_B = ''
@@ -1277,7 +1283,7 @@
this.hform.HMainSourceBillType = data.HSourceBillType
this.hform.HSourceBillNo = data.HSourceBillNo
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data.HSourceBillType)
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
this.hform.HMainSourceBillType = data.HSourceBillType
@@ -1389,27 +1395,39 @@
data: {
oMain: sMainStr
},
- success: (res) => {
+ success: async (res) => {
console.log(1, res);
uni.hideLoading()
if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/caigouruku/form?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
- }
- });
+ let sMain = JSON.stringify(this.materMeta) + ';' + this.hform.HBillType + ';' + this.hform.HBillNo
+ try {
+ // 涓烘潯鐮佽缃嚭搴撳崟鍙峰拰鍑哄簱娆℃暟
+ await this.Set_BarCodeBill(sMain)
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/caigouruku/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+
} else {
uni.showToast({
title: res.data.Message,
@@ -1432,7 +1450,25 @@
showBillList() {
this.$refs.billList.showPopup()
},
-
+ Set_BarCodeBill(sMain) {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ method: 'POST',
+ url: 'Sc_BarCode/Set_BarCodeBill',
+ data: {
+ msg: sMain
+ },
+ resFunction: (res) => {
+ let {data, count, Message} = res.data
+ if(count == 1) {
+ resolve()
+ }else {
+ reject(Message)
+ }
+ }
+ })
+ })
+ },
goBack() {
uni.showModal({
title: '鎻愮ず',
diff --git a/pages/caigoutuiliao/form.vue b/pages/caigoutuiliao/form.vue
index 823d34b..e75b636 100644
--- a/pages/caigoutuiliao/form.vue
+++ b/pages/caigoutuiliao/form.vue
@@ -1027,10 +1027,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
diff --git a/pages/index/index.vue b/pages/index/index.vue
index b4843fe..67d63d4 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,525 +1,556 @@
<template>
- <view class="content">
- <view class="header">鏅轰簯L-MES鍒堕�犳墽琛岀郴缁�
- <view class="switch-button">
- <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons>
- </view>
- </view>
- <view class="mains">
- <view v-if="!canEdit" :hidden="item.hidden" class="box" v-for="(item,index) in itemData" :key="index" @tap="toUrl(item)">
- <image :src="item.img" mode=""></image>
- <view class="texts">
- {{item.text}}
- </view>
- </view>
- <view :enable-hidden="item.hidden" v-if="canEdit" class="box edit" v-for="(item,index) in itemData"
- :key="index" @tap="switchHidden(index)">
- <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
- <image :src="item.img" mode=""></image>
- <view class="texts">
- {{item.text}}
- </view>
- </view>
- </view>
+ <view class="content">
+ <view class="header">鏅轰簯L-MES鍒堕�犳墽琛岀郴缁�
+ <view class="switch-button">
+ <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons>
+ </view>
+ </view>
+ <view class="mains">
+ <view v-if="!canEdit" :hidden="item.hidden" class="box" v-for="(item,index) in itemData" :key="index"
+ @tap="toUrl(item)">
+ <image :src="item.img" mode=""></image>
+ <view class="texts">
+ {{item.text}}
+ </view>
+ </view>
+ <view :enable-hidden="item.hidden" v-if="canEdit" class="box edit" v-for="(item,index) in itemData"
+ :key="index" @tap="switchHidden(index)">
+ <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons>
+ <image :src="item.img" mode=""></image>
+ <view class="texts">
+ {{item.text}}
+ </view>
+ </view>
+ </view>
- <vers></vers>
- </view>
+ <vers></vers>
+ </view>
</template>
<script>
- import vers from './vers.vue';
- import { setMenuList, getMenuList } from '../../utils/menuListApp';
- import { CommonUtils } from '../../utils/common';
- import { getUserInfo } from '../../utils/auth';
- export default {
- components: {
- vers,
- },
- data() {
- return {
- updateCount: 0,
- menuListName: 'index',
- canEdit: false,
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
- itemData: [{
- img: '../../static/icon/icon8.png',
- text: '閲囪喘璁㈠崟鏍囩',
- url: '/pages/caigoudingdan/caigoudingdan',
- id: 1,
- hidden: false,
- }, {
- img: '../../static/icon/icon4.png',
- text: '閲囪喘璁㈠崟瀛愭爣绛�',
- url: '/pages/tiaomadaying/tiaomadaying',
- id: 2,
- hidden: false,
- }, {
- img: '../../static/icon/icon11.png',
- text: '鏀舵枡閫氱煡鍗曟爣绛�',
- url: '/pages/shouliaotongzhi/table',
- id: 3,
- hidden: false,
- }, {
- img: '../../static/icon/icon17.png',
- text: '閲囪喘鍏ュ簱鏂板',
- url: '/pages/caigouruku/form?OperationType=1',
- id: 4,
- hidden: false,
- }, {
- img: '../../static/icon/icon20.png',
- text: '閲囪喘閫�鏂欐柊澧�',
- url: '/pages/caigoutuiliao/form?OperationType=1',
- id: 5,
- hidden: false,
- }, {
- img: '../../static/icon/icon32.png',
- text: '鐩存帴璋冩嫧鏂板',
- url: '/pages/zhijiediaobo/form?OperationType=1',
- id: 6,
- hidden: false,
- }, {
- img: '../../static/icon/icon30.png',
- text: '鐢熶骇棰嗘枡鏂板',
- url: '/pages/shengchanlingliaoshengdan/form?OperationType=1',
- id: 7,
- hidden: false,
- }, {
- img: '../../static/icon/icon31.png',
- text: '鐢熶骇琛ユ枡鏂板',
- url: '/pages/shengchanbuliao/form?OperationType=1',
- id: 8,
- hidden: false,
- }, {
- img: '../../static/icon/icon17.png',
- text: '鐢熶骇鍏ュ簱鏂板',
- url: '/pages/shengchanrukushengdan/form?OperationType=1',
- id: 9,
- hidden: false,
- }, {
- img: '../../static/icon/icon30.png',
- text: '濮斿棰嗘枡鏂板',
- url: '/pages/weiwailingliao/form?OperationType=1',
- id: 10,
- hidden: false,
- }, {
- img: '../../static/icon/icon17.png',
- text: '鍏朵粬鍏ュ簱鏂板',
- url: '/pages/qitaruku_v2/form?OperationType=1',
- id: 11,
- hidden: false,
- }, {
- img: '../../static/icon/icon18.png',
- text: '鍏朵粬鍑哄簱鏂板',
- url: '/pages/qitachuku_v2/form?OperationType=1',
- id: 12,
- hidden: false,
- }, {
- img: '../../static/icon/icon18.png',
- text: '閿�鍞嚭搴撴柊澧�',
- url: '/pages/xiaoshouchuku/form?OperationType=1',
- id: 13,
- hidden: false,
- }, {
- img: '../../static/icon/icon19.png',
- text: '閿�鍞��璐ф柊澧�',
- url: '/pages/xiaoshoutuihuo/form?OperationType=1',
- id: 14,
- hidden: false,
- }, {
- img: '../../static/icon/icon30.png',
- text: '鐢熶骇棰嗘枡妫�楠�',
- url: '/pages/shengchanlingliao/form?OperationType=1',
- id: 15,
- hidden: false,
- }, {
- img: '../../static/icon/icon31.png',
- text: '鐢熶骇琛ユ枡鏍¢獙',
- url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1',
- id: 16,
- hidden: false,
- }, {
- img: '../../static/icon/icon32.png',
- text: '鐢熶骇璋冩嫧鏍¢獙',
- url: '/pages/shengchandiaobo/form?OperationType=1',
- id: 17,
- hidden: false,
- }, {
- img: '../../static/icon/icon18.png',
- text: '鍏朵粬鍑哄簱鏍¢獙',
- url: '/pages/qitachukujiaoyan/detail?OperationType=1',
- id: 18,
- hidden: false,
- }, {
- img: '../../static/icon/icon17.png',
- text: '鐢熶骇鍏ュ簱鏍¢獙',
- url: '/pages/shengchanruku/form?OperationType=1',
- id: 19,
- hidden: false,
- }, {
- img: '../../static/icon/icon18.png',
- text: '閿�鍞嚭搴撴牎楠�',
- url: '/pages/xiaoshouchukujiaoyan/form?OperationType=1',
- id: 20,
- hidden: false,
- }, {
- img: '../../static/icon/icon30.png',
- text: '濮斿棰嗘枡鏍¢獙',
- url: '/pages/weiwailingliaojiaoyan/form?OperationType=1',
- id: 21,
- hidden: false,
- }],
- // itemData: [{
- // img: '../../static/icon/icon1.png',
- // text: '璁惧妗f',
- // url: '/pages/shebeidangan/table',
- // id: 1
- // }, {
- // img: '../../static/icon/icon8.png',
- // text: '璁惧灞ュ巻',
- // url: '/pages/shebeilvli/table',
- // id: 0,
- // }, {
- // img: '../../static/icon/icon2.png',
- // text: '璁惧淇濆吇璁″垝鍗�',
- // url: '/pages/baoyangjihua/table',
- // id: 2
- // }, {
- // img: '../../static/icon/icon3.png',
- // text: '璁惧淇濆吇璁板綍鍗�',
- // url: '/pages/baoyangjilu/table',
- // id: 3
- // }, {
- // img: '../../static/icon/icon4.png',
- // text: '璁惧鐐规璁″垝鍗�',
- // url: '',
- // id: 4
- // }, {
- // img: '../../static/icon/icon5.png',
- // text: '璁惧鐐规璁板綍鍗�',
- // url: '',
- // id: 5,
- // }, {
- // img: '../../static/icon/icon6.png',
- // text: '璁惧鏁呴殰鐧昏琛�',
- // url: '/pages/guzhangdengji/table',
- // id: 6
- // }, {
- // img: '../../static/icon/icon7.png',
- // text: '璁惧缁翠慨璁板綍鍗�',
- // url: '/pages/shebeiweixiu/table',
- // id: 7,
- // // },{
- // // img:'../../static/icon/icon8.png',
- // // text:'璁惧灞ュ巻',
- // // url:'/pages/shebeilvli/table',
- // // id:8,
- // }, {
- // img: '../../static/icon/icon9.png',
- // text: '宸ュ簭杩涚珯鎺ユ敹鍗�',
- // url: '/pages/gongxuIn/table',
- // id: 9,
- // }, {
- // img: '../../static/icon/icon10.png',
- // text: '宸ュ簭鍑虹珯姹囨姤鍗�',
- // url: '/pages/gongxuOut/table',
- // id: 10,
- // }, {
- // img: '../../static/icon/icon11.png',
- // text: '宸ュ簭濮斿鍙戝嚭鍗�',
- // url: '/pages/weiwaigxIn/table',
- // id: 11,
- // }, {
- // img: '../../static/icon/icon12.png',
- // text: '宸ュ簭濮斿鎺ユ敹鍗�',
- // url: '/pages/weiwaigxOut/table',
- // id: 12,
- // // }, {
- // // img: '../../static/icon/icon13.png',
- // // text: '璁惧绠$悊',
- // // url: '/pages/shebeiguanli/table',
- // // id: 13,
- // }, {
- // img: '../../static/icon/icon14.png',
- // text: '鎶ュ伐骞冲彴',
- // url: '/pages/baogong/table',
- // id: 14,
- // }, {
- // img: '../../static/icon/icon15.png',
- // text: '寮傚父鍙嶉鍗�',
- // url: '/pages/yichang/table',
- // id: 15,
- // }, {
- // img: '../../static/icon/icon16.png',
- // text: '寮傚父鍙嶉澶勭悊鍗�',
- // url: '/pages/yichang/list',
- // id: 16,
- // }, {
- // img: '../../static/icon/icon17.png',
- // text: '閲囪喘鍏ュ簱',
- // url: '/pages/caigouruku/table',
- // id: 17,
- // }, {
- // img: '../../static/icon/icon18.png',
- // text: '閲囪喘閫�鏂�',
- // url: '/pages/caigoutuiliao/table',
- // id: 18,
- // }, {
- // img: '../../static/icon/icon19.png',
- // text: '閿�鍞嚭搴�',
- // url: '/pages/xiaoshouchuku/table',
- // id: 19,
- // }, {
- // img: '../../static/icon/icon20.png',
- // text: '閿�鍞��璐�',
- // url: '/pages/xiaoshoutuihuo/table',
- // id: 20,
- // }, {
- // img: '../../static/icon/icon21.png',
- // text: '鏀舵枡閫氱煡鍗�',
- // url: '/pages/shouliaotongzhi/table',
- // id: 21,
- // },{
- // img: '../../static/icon/icon30.png',
- // text: '鐢熶骇棰嗘枡鏍¢獙',
- // url: '/pages/shengchanlingliao/table',
- // id: 30,
- // },{
- // img: '../../static/icon/icon31.png',
- // text: '鐢熶骇鍏ュ簱鏍¢獙',
- // url: '/pages/shengchanruku/table',
- // id: 31,
- // },{
- // img: '../../static/icon/icon32.png',
- // text: '鐢熶骇璋冩嫧鏍¢獙',
- // url: '/pages/shengchandiaobo/table',
- // id: 32,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鏍囩鎵撳嵃',
- // url: '/pages/labelPrinter/index',
- // id: 22,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '璁惧杩愯鐘舵��',
- // url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai',
- // id: 23,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '妯″叿杩愯鐘舵��',
- // url: '/pages/mujvzhuangtai/mujvzhuangtai',
- // id: 24,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鏉$爜鎷嗙爜',
- // url: '/pages/tiaomachaima/tiaomachaima',
- // id: 25,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鍏朵粬鍏ュ簱',
- // url: '/pages/qitaruku/qitaruku',
- // id: 26,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鍏朵粬鍑哄簱',
- // url: '/pages/qitachuku/qitachuku',
- // id: 27,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鏉ユ枡鏉$爜鎵撳嵃',
- // url: '/pages/tiaomadaying/tiaomadaying',
- // id: 28,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '涓婃ā鍗�',
- // url: '/pages/MJGL/shangmudan/table',
- // id: 29,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '閲囪喘璁㈠崟',
- // url: '/pages/caigoudingdan/caigoudingdan',
- // id: 30,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鍏朵粬鍑哄簱鏍¢獙',
- // url: '/pages/qitachukujiaoyan/qitachukujiaoyan',
- // id: 31,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鐢熶骇琛ユ枡鏍¢獙',
- // url: '/pages/shengchanbuliaojiaoyan/CacheList',
- // id: 32,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '閿�鍞嚭搴撴牎楠�',
- // url: '/pages/xiaoshouchukujiaoyan/table',
- // id: 33,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '濮斿棰嗘枡鏍¢獙',
- // url: '/pages/weiwailingliaojiaoyan/table',
- // id: 34,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '閲囪喘鍏ュ簱鏍¢獙',
- // url: '/pages/caigourukujiaoyan/table',
- // id: 35,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '鍏朵粬鍏ュ簱鏍¢獙',
- // url: '/pages/qitarukujiaoyan/table',
- // id: 36,
- // },
- // {
- // img: '../../static/icon/icon16.png',
- // text: '濮斿琛ユ枡鏍¢獙',
- // url: '/pages/weiwaibuliaojiaoyan/table',
- // id: 37,
- // },
- // {
- // img: '../../static/icon/icon17.png',
- // text: '鐢熶骇棰嗘枡',
- // url: '/pages/shengchanlingliaoshengdan/table',
- // id: 38,
- // },
- // ]
- }
- },
- onLoad() {
- this.getHiddenItem()
- },
- methods: {
- checkCardShow(item) {
- if(item.HMaker && item.HMaker != getUserInfo()['Czymc'] && item.hidden == true){
- return false
- }
- return true
- },
- async getHiddenItem() {
- // let itemCache = uni.getStorageSync('HIndexItemData') || ''
- // console.log('itemCache: ',itemCache);
- // if(itemCache !== '') {
- // this.itemData = itemCache
- // }
-
- let data = await getMenuList({
- menuName: this.menuListName
- })
- Array.from(data).forEach(e => {
- this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"])
- this.itemData[e["HIndex"]].HMaker = e["HMaker"]
- })
- },
- switchHidden(index) {
- this.updateCount ++;
- this.itemData[index].hidden = !this.itemData[index].hidden
- },
- switchIconsModeHandler() {
- this.canEdit = !this.canEdit
- if(this.canEdit == false && this.updateCount > 0) {
- this.$nextTick(() => {
- // uni.setStorageSync("HIndexItemData", this.itemData)
- setMenuList({
- menuName: this.menuListName,
- payload: this.itemData
- })
-
- this.updateCount = 0
- })
- }
- this.$forceUpdate()
- },
- toUrl(item) {
- if (item.url) {
- uni.navigateTo({
- url: item.url
- })
- } else {
- uni.showToast({
- title: '鍔熻兘寮�鍙戜腑銆傘�傘��',
- icon: 'none'
- })
- }
- }
- }
- }
+ import vers from './vers.vue';
+ import {
+ setMenuList,
+ getMenuList
+ } from '../../utils/menuListApp';
+ import {
+ CommonUtils
+ } from '../../utils/common';
+ import {
+ getUserInfo
+ } from '../../utils/auth';
+ export default {
+ components: {
+ vers,
+ },
+ data() {
+ return {
+ updateCount: 0,
+ menuListName: 'index',
+ canEdit: false,
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ itemData: [{
+ img: '../../static/icon/icon8.png',
+ text: '鏉$爜绠$悊-鏀舵枡閫氱煡鍗�',
+ url: '/pages/tiaomaguanli/table?HBillType=1103',
+ id: 1,
+ hidden: false,
+ },
+ // {
+ // img: '../../static/icon/icon8.png',
+ // text: '鎵爜鍑哄簱',
+ // url: '/pages/saomachuku/table',
+ // id: 1,
+ // hidden: false,
+ // },
+ {
+ img: '../../static/icon/icon8.png',
+ text: '閲囪喘璁㈠崟鏍囩',
+ url: '/pages/caigoudingdan/caigoudingdan',
+ id: 1,
+ hidden: true,
+ }, {
+ img: '../../static/icon/icon4.png',
+ text: '閲囪喘璁㈠崟瀛愭爣绛�',
+ url: '/pages/tiaomadaying/tiaomadaying',
+ id: 2,
+ hidden: true,
+ },
+ {
+ img: '../../static/icon/icon11.png',
+ text: '鏀舵枡閫氱煡鍗曟爣绛�',
+ url: '/pages/shouliaotongzhi/table',
+ id: 3,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon17.png',
+ text: '閲囪喘鍏ュ簱鏂板',
+ url: '/pages/caigouruku/form?OperationType=1',
+ id: 4,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon20.png',
+ text: '閲囪喘閫�鏂欐柊澧�',
+ url: '/pages/caigoutuiliao/form?OperationType=1',
+ id: 5,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon32.png',
+ text: '鐩存帴璋冩嫧鏂板',
+ url: '/pages/zhijiediaobo/form?OperationType=1',
+ id: 6,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon30.png',
+ text: '鐢熶骇棰嗘枡鏂板',
+ url: '/pages/shengchanlingliaoshengdan/form?OperationType=1',
+ id: 7,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon31.png',
+ text: '鐢熶骇琛ユ枡鏂板',
+ url: '/pages/shengchanbuliao/form?OperationType=1',
+ id: 8,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon17.png',
+ text: '鐢熶骇鍏ュ簱鏂板',
+ url: '/pages/shengchanrukushengdan/form?OperationType=1',
+ id: 9,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon30.png',
+ text: '濮斿棰嗘枡鏂板',
+ url: '/pages/weiwailingliao/form?OperationType=1',
+ id: 10,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon17.png',
+ text: '鍏朵粬鍏ュ簱鏂板',
+ url: '/pages/qitaruku_v2/form?OperationType=1',
+ id: 11,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon18.png',
+ text: '鍏朵粬鍑哄簱鏂板',
+ url: '/pages/qitachuku_v2/form?OperationType=1',
+ id: 12,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon18.png',
+ text: '閿�鍞嚭搴撴柊澧�',
+ url: '/pages/xiaoshouchuku/form?OperationType=1',
+ id: 13,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon19.png',
+ text: '閿�鍞��璐ф柊澧�',
+ url: '/pages/xiaoshoutuihuo/form?OperationType=1',
+ id: 14,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon19.png',
+ text: '濮斿鍏ュ簱鏂板',
+ url: '/pages/weiwairuku/form?OperationType=1',
+ id: 15,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon30.png',
+ text: '鐢熶骇棰嗘枡妫�楠�',
+ url: '/pages/shengchanlingliao/form?OperationType=1',
+ id: 16,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon31.png',
+ text: '鐢熶骇琛ユ枡鏍¢獙',
+ url: '/pages/shengchanbuliaojiaoyan/form?OperationType=1',
+ id: 17,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon32.png',
+ text: '鐢熶骇璋冩嫧鏍¢獙',
+ url: '/pages/shengchandiaobo/form?OperationType=1',
+ id: 18,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon18.png',
+ text: '鍏朵粬鍑哄簱鏍¢獙',
+ url: '/pages/qitachukujiaoyan/detail?OperationType=1',
+ id: 19,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon17.png',
+ text: '鐢熶骇鍏ュ簱鏍¢獙',
+ url: '/pages/shengchanruku/form?OperationType=1',
+ id: 20,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon18.png',
+ text: '閿�鍞嚭搴撴牎楠�',
+ url: '/pages/xiaoshouchukujiaoyan/form?OperationType=1',
+ id: 21,
+ hidden: false,
+ }, {
+ img: '../../static/icon/icon30.png',
+ text: '濮斿棰嗘枡鏍¢獙',
+ url: '/pages/weiwailingliaojiaoyan/form?OperationType=1',
+ id: 22,
+ hidden: false,
+ }
+ ],
+ // itemData: [{
+ // img: '../../static/icon/icon1.png',
+ // text: '璁惧妗f',
+ // url: '/pages/shebeidangan/table',
+ // id: 1
+ // }, {
+ // img: '../../static/icon/icon8.png',
+ // text: '璁惧灞ュ巻',
+ // url: '/pages/shebeilvli/table',
+ // id: 0,
+ // }, {
+ // img: '../../static/icon/icon2.png',
+ // text: '璁惧淇濆吇璁″垝鍗�',
+ // url: '/pages/baoyangjihua/table',
+ // id: 2
+ // }, {
+ // img: '../../static/icon/icon3.png',
+ // text: '璁惧淇濆吇璁板綍鍗�',
+ // url: '/pages/baoyangjilu/table',
+ // id: 3
+ // }, {
+ // img: '../../static/icon/icon4.png',
+ // text: '璁惧鐐规璁″垝鍗�',
+ // url: '',
+ // id: 4
+ // }, {
+ // img: '../../static/icon/icon5.png',
+ // text: '璁惧鐐规璁板綍鍗�',
+ // url: '',
+ // id: 5,
+ // }, {
+ // img: '../../static/icon/icon6.png',
+ // text: '璁惧鏁呴殰鐧昏琛�',
+ // url: '/pages/guzhangdengji/table',
+ // id: 6
+ // }, {
+ // img: '../../static/icon/icon7.png',
+ // text: '璁惧缁翠慨璁板綍鍗�',
+ // url: '/pages/shebeiweixiu/table',
+ // id: 7,
+ // // },{
+ // // img:'../../static/icon/icon8.png',
+ // // text:'璁惧灞ュ巻',
+ // // url:'/pages/shebeilvli/table',
+ // // id:8,
+ // }, {
+ // img: '../../static/icon/icon9.png',
+ // text: '宸ュ簭杩涚珯鎺ユ敹鍗�',
+ // url: '/pages/gongxuIn/table',
+ // id: 9,
+ // }, {
+ // img: '../../static/icon/icon10.png',
+ // text: '宸ュ簭鍑虹珯姹囨姤鍗�',
+ // url: '/pages/gongxuOut/table',
+ // id: 10,
+ // }, {
+ // img: '../../static/icon/icon11.png',
+ // text: '宸ュ簭濮斿鍙戝嚭鍗�',
+ // url: '/pages/weiwaigxIn/table',
+ // id: 11,
+ // }, {
+ // img: '../../static/icon/icon12.png',
+ // text: '宸ュ簭濮斿鎺ユ敹鍗�',
+ // url: '/pages/weiwaigxOut/table',
+ // id: 12,
+ // // }, {
+ // // img: '../../static/icon/icon13.png',
+ // // text: '璁惧绠$悊',
+ // // url: '/pages/shebeiguanli/table',
+ // // id: 13,
+ // }, {
+ // img: '../../static/icon/icon14.png',
+ // text: '鎶ュ伐骞冲彴',
+ // url: '/pages/baogong/table',
+ // id: 14,
+ // }, {
+ // img: '../../static/icon/icon15.png',
+ // text: '寮傚父鍙嶉鍗�',
+ // url: '/pages/yichang/table',
+ // id: 15,
+ // }, {
+ // img: '../../static/icon/icon16.png',
+ // text: '寮傚父鍙嶉澶勭悊鍗�',
+ // url: '/pages/yichang/list',
+ // id: 16,
+ // }, {
+ // img: '../../static/icon/icon17.png',
+ // text: '閲囪喘鍏ュ簱',
+ // url: '/pages/caigouruku/table',
+ // id: 17,
+ // }, {
+ // img: '../../static/icon/icon18.png',
+ // text: '閲囪喘閫�鏂�',
+ // url: '/pages/caigoutuiliao/table',
+ // id: 18,
+ // }, {
+ // img: '../../static/icon/icon19.png',
+ // text: '閿�鍞嚭搴�',
+ // url: '/pages/xiaoshouchuku/table',
+ // id: 19,
+ // }, {
+ // img: '../../static/icon/icon20.png',
+ // text: '閿�鍞��璐�',
+ // url: '/pages/xiaoshoutuihuo/table',
+ // id: 20,
+ // }, {
+ // img: '../../static/icon/icon21.png',
+ // text: '鏀舵枡閫氱煡鍗�',
+ // url: '/pages/shouliaotongzhi/table',
+ // id: 21,
+ // },{
+ // img: '../../static/icon/icon30.png',
+ // text: '鐢熶骇棰嗘枡鏍¢獙',
+ // url: '/pages/shengchanlingliao/table',
+ // id: 30,
+ // },{
+ // img: '../../static/icon/icon31.png',
+ // text: '鐢熶骇鍏ュ簱鏍¢獙',
+ // url: '/pages/shengchanruku/table',
+ // id: 31,
+ // },{
+ // img: '../../static/icon/icon32.png',
+ // text: '鐢熶骇璋冩嫧鏍¢獙',
+ // url: '/pages/shengchandiaobo/table',
+ // id: 32,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鏍囩鎵撳嵃',
+ // url: '/pages/labelPrinter/index',
+ // id: 22,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '璁惧杩愯鐘舵��',
+ // url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai',
+ // id: 23,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '妯″叿杩愯鐘舵��',
+ // url: '/pages/mujvzhuangtai/mujvzhuangtai',
+ // id: 24,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鏉$爜鎷嗙爜',
+ // url: '/pages/tiaomachaima/tiaomachaima',
+ // id: 25,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鍏朵粬鍏ュ簱',
+ // url: '/pages/qitaruku/qitaruku',
+ // id: 26,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鍏朵粬鍑哄簱',
+ // url: '/pages/qitachuku/qitachuku',
+ // id: 27,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鏉ユ枡鏉$爜鎵撳嵃',
+ // url: '/pages/tiaomadaying/tiaomadaying',
+ // id: 28,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '涓婃ā鍗�',
+ // url: '/pages/MJGL/shangmudan/table',
+ // id: 29,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '閲囪喘璁㈠崟',
+ // url: '/pages/caigoudingdan/caigoudingdan',
+ // id: 30,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鍏朵粬鍑哄簱鏍¢獙',
+ // url: '/pages/qitachukujiaoyan/qitachukujiaoyan',
+ // id: 31,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鐢熶骇琛ユ枡鏍¢獙',
+ // url: '/pages/shengchanbuliaojiaoyan/CacheList',
+ // id: 32,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '閿�鍞嚭搴撴牎楠�',
+ // url: '/pages/xiaoshouchukujiaoyan/table',
+ // id: 33,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '濮斿棰嗘枡鏍¢獙',
+ // url: '/pages/weiwailingliaojiaoyan/table',
+ // id: 34,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '閲囪喘鍏ュ簱鏍¢獙',
+ // url: '/pages/caigourukujiaoyan/table',
+ // id: 35,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '鍏朵粬鍏ュ簱鏍¢獙',
+ // url: '/pages/qitarukujiaoyan/table',
+ // id: 36,
+ // },
+ // {
+ // img: '../../static/icon/icon16.png',
+ // text: '濮斿琛ユ枡鏍¢獙',
+ // url: '/pages/weiwaibuliaojiaoyan/table',
+ // id: 37,
+ // },
+ // {
+ // img: '../../static/icon/icon17.png',
+ // text: '鐢熶骇棰嗘枡',
+ // url: '/pages/shengchanlingliaoshengdan/table',
+ // id: 38,
+ // },
+ // ]
+ }
+ },
+ onLoad() {
+ this.getHiddenItem()
+ },
+ methods: {
+ checkCardShow(item) {
+ if (item.HMaker && item.HMaker != getUserInfo()['Czymc'] && item.hidden == true) {
+ return false
+ }
+ return true
+ },
+ async getHiddenItem() {
+ // let itemCache = uni.getStorageSync('HIndexItemData') || ''
+ // console.log('itemCache: ',itemCache);
+ // if(itemCache !== '') {
+ // this.itemData = itemCache
+ // }
+
+ let data = await getMenuList({
+ menuName: this.menuListName
+ })
+ Array.from(data).forEach(e => {
+ this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"])
+ this.itemData[e["HIndex"]].HMaker = e["HMaker"]
+ })
+ },
+ switchHidden(index) {
+ this.updateCount++;
+ this.itemData[index].hidden = !this.itemData[index].hidden
+ },
+ switchIconsModeHandler() {
+ this.canEdit = !this.canEdit
+ if (this.canEdit == false && this.updateCount > 0) {
+ this.$nextTick(() => {
+ // uni.setStorageSync("HIndexItemData", this.itemData)
+ setMenuList({
+ menuName: this.menuListName,
+ payload: this.itemData
+ })
+
+ this.updateCount = 0
+ })
+ }
+ this.$forceUpdate()
+ },
+ toUrl(item) {
+ if (item.url) {
+ uni.navigateTo({
+ url: item.url
+ })
+ } else {
+ uni.showToast({
+ title: '鍔熻兘寮�鍙戜腑銆傘�傘��',
+ icon: 'none'
+ })
+ }
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
- .header {
- width: 750rpx;
- background: linear-gradient(0deg, #71AFFC 0%, #3A78FF 100%);
- font-size: 47rpx;
- font-weight: bold;
- color: #FFFFFF;
- text-align: center;
- padding: 9vh 0 6vh 0;
- position: relative;
- }
+ .header {
+ width: 750rpx;
+ background: linear-gradient(0deg, #71AFFC 0%, #3A78FF 100%);
+ font-size: 47rpx;
+ font-weight: bold;
+ color: #FFFFFF;
+ text-align: center;
+ padding: 9vh 0 6vh 0;
+ position: relative;
+ }
- .switch-button {
- position: absolute;
- right: 10rpx;
- bottom: 0;
- }
+ .switch-button {
+ position: absolute;
+ right: 10rpx;
+ bottom: 0;
+ }
- .mains {
- width: 720rpx;
- margin: 0 auto;
- display: flex;
- flex-wrap: wrap;
- margin-top: 3vh;
- padding-bottom: 5vh;
+ .mains {
+ width: 720rpx;
+ margin: 0 auto;
+ display: flex;
+ flex-wrap: wrap;
+ margin-top: 3vh;
+ padding-bottom: 5vh;
- .box {
- width: 25%;
- margin-top: 2.5vh;
- text-align: center;
+ .box {
+ width: 25%;
+ margin-top: 2.5vh;
+ text-align: center;
- image {
- width: 18vw;
- height: 18vw;
- }
+ image {
+ width: 18vw;
+ height: 18vw;
+ }
- .texts {
- width: 120rpx;
- margin: 0 auto;
- font-size: 29rpx;
- font-weight: normal;
- color: #333333;
- margin-top: .2vh;
- }
- }
-
- .edit {
- position: relative;
- }
-
- .edit-mark {
- position: absolute;
- top: 0;
- right: 0;
- }
+ .texts {
+ width: 120rpx;
+ margin: 0 auto;
+ font-size: 29rpx;
+ font-weight: normal;
+ color: #333333;
+ margin-top: .2vh;
+ }
+ }
- view[enable-hidden] {
- opacity: .4 !important;
- }
- view[hidden] {
- display: none;
- }
- }
+ .edit {
+ position: relative;
+ }
+
+ .edit-mark {
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+
+ view[enable-hidden] {
+ opacity: .4 !important;
+ }
+
+ view[hidden] {
+ display: none;
+ }
+ }
</style>
\ No newline at end of file
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index 99713d6..f7d578a 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -104,102 +104,116 @@
url: '/pages/xiaoshoutuihuo/table',
id: 11,
hidden: false,
- }, {
+ },
+ {
+ img: '../../static/icon/icon20.png',
+ text: '濮斿鍏ュ簱鏆傚瓨鍒楄〃',
+ url: '/pages/weiwairuku/table',
+ id: 12,
+ hidden: false,
+ }, {
img: '../../static/icon/icon30.png',
text: '鐢熶骇棰嗘枡鏍¢獙鏆傚瓨鍒楄〃',
url: '/pages/shengchanlingliao/table',
- id: 12,
+ id: 13,
hidden: false,
}, {
img: '../../static/icon/icon31.png',
text: '鐢熶骇琛ユ枡鏍¢獙鏆傚瓨鍒楄〃',
url: '/pages/shengchanbuliaojiaoyan/CacheList',
- id: 13,
+ id: 14,
hidden: false,
}, {
img: '../../static/icon/icon32.png',
text: '鐢熶骇璋冩嫧鏍¢獙鏆傚瓨鍒楄〃',
url: '/pages/shengchandiaobo/table',
- id: 14,
+ id: 15,
hidden: false,
}, {
img: '../../static/icon/icon18.png',
text: '鍏朵粬鍑哄簱鏍¢獙鏆傚瓨鍒楄〃',
url: '/pages/qitachuku/qitachuku',
- id: 15,
+ id: 16,
hidden: false,
}, {
img: '../../static/icon/icon17.png',
text: '鐢熶骇鍏ュ簱鏍¢獙鏆傚瓨鍒楄〃',
url: '/pages/shengchanruku/table',
- id: 16,
+ id: 17,
hidden: false,
}, {
img: '../../static/icon/icon18.png',
text: '閿�鍞嚭搴撴牎楠屾殏瀛樺垪琛�',
url: '/pages/xiaoshouchukujiaoyan/table',
- id: 17,
+ id: 18,
hidden: false,
}, {
img: '../../static/icon/icon30.png',
text: '濮斿棰嗘枡鏍¢獙鏆傚瓨鍒楄〃',
url: '/pages/weiwailingliaojiaoyan/table',
- id: 18,
+ id: 19,
hidden: false,
}, {
img: '../../static/icon/icon3.png',
text: '璁惧淇濆吇璁板綍鍗�',
url: '/pages/baoyangjilu/table',
- id: 19,
+ id: 20,
hidden: false,
}, {
img: '../../static/icon/icon5.png',
text: '璁惧鐐规璁板綍鍗�',
url: '',
- id: 20,
+ id: 21,
hidden: false,
}, {
img: '../../static/icon/icon6.png',
text: '璁惧鏁呴殰鐧昏琛�',
url: '/pages/guzhangdengji/table',
- id: 21,
+ id: 22,
hidden: false,
}, {
img: '../../static/icon/icon7.png',
text: '璁惧缁翠慨璁板綍鍗�',
url: '/pages/shebeiweixiu/table',
- id: 22,
+ id: 23,
hidden: false,
}, {
img: '../../static/icon/icon15.png',
text: '寮傚父鍙嶉鍗�',
url: '/pages/yichang/table',
- id: 23,
+ id: 24,
hidden: false,
}, {
img: '../../static/icon/icon16.png',
text: '寮傚父鍙嶉澶勭悊鍗�',
url: '/pages/yichang/list',
- id: 24,
+ id: 25,
hidden: false,
}, {
img: '../../static/icon/icon21.png',
text: '鏍囩鎵撳嵃',
url: '/pages/labelPrinter/index',
- id: 25,
+ id: 26,
hidden: false,
}, {
img: '../../static/icon/icon21.png',
text: '鏉$爜鎷嗙爜',
url: '/pages/tiaomachaima/tiaomachaima',
- id: 26,
+ id: 27,
hidden: false,
},
{
img: '../../static/icon/icon18.png',
text: 'ERP鍙婃椂搴撳瓨鏌ヨ',
url: '/pages/jishikucunchaxun/table',
- id: 27,
+ id: 28,
+ hidden: false,
+ },
+ {
+ img: '../../static/icon/icon21.png',
+ text: '鏉$爜鎷嗙爜2',
+ url: '/pages/tiaomachaima/tiaomachaima2',
+ id: 29,
hidden: false,
},
// , {
diff --git a/pages/qitachuku_v2/form.vue b/pages/qitachuku_v2/form.vue
index b1fd273..a6fd6cb 100644
--- a/pages/qitachuku_v2/form.vue
+++ b/pages/qitachuku_v2/form.vue
@@ -1132,7 +1132,7 @@
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
this.hform.HMainSourceBillType = data.hSourceBillTypeField
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1330,7 +1330,7 @@
this.hform.HMainSourceBillType = data.HSourceBillType
this.hform.HSourceBillNo = data.HSourceBillNo
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data.HSourceBillType)
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
this.hform.HMainSourceBillType = data.HSourceBillType
diff --git a/pages/qitaruku_v2/form.vue b/pages/qitaruku_v2/form.vue
index 504bf6c..5dc89f1 100644
--- a/pages/qitaruku_v2/form.vue
+++ b/pages/qitaruku_v2/form.vue
@@ -1128,7 +1128,7 @@
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
this.hform.HMainSourceBillType = data.hSourceBillTypeField
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1153,10 +1153,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
@@ -1326,7 +1358,7 @@
this.hform.HMainSourceBillType = data.HSourceBillType
this.hform.HSourceBillNo = data.HSourceBillNo
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data.HSourceBillType)
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
this.hform.HMainSourceBillType = data.HSourceBillType
diff --git a/pages/saomachuku/table.vue b/pages/saomachuku/table.vue
new file mode 100644
index 0000000..79c297d
--- /dev/null
+++ b/pages/saomachuku/table.vue
@@ -0,0 +1,934 @@
+<template>
+ <view class="page" id="pageContent">
+ <view class="search-condition-zone">
+ <view class="form-item">
+ <view class="left">
+ 鏉$爜:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="HBarCode" @confirm="getCode(HBarCode)" />
+ </view>
+ <view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanCode"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 鍙戣揣閫氱煡鍗�:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 瀹㈡埛:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="HCustomer" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 閿�鍞憳:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="HSeller" />
+ </view>
+ </view>
+ </view>
+ <view class="button-zone">
+ <button type="default" class="btn-a" size="mini" @tap="cmdSearch">鏌ヨ</button>
+ <button type="default" class="btn-c" size="mini" @tap="exit">閫�鍑�</button>
+ </view>
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+ <view class="info-list-zone">
+ <view class="card-item" v-for="(item, index) in listDataShow">
+ <uni-card :title="item['鍗曟嵁鍙�']" note="Tips">
+ <view class="card-detail">
+ <view class="detail" v-if="item['涓氬姟鍛�']">
+ <text>閿�鍞憳锛�</text>{{item['涓氬姟鍛�']}}
+ </view>
+ <view class="detail" v-if="item['瀹㈡埛']">
+ <text>瀹㈡埛锛�</text>{{item['瀹㈡埛']}}
+ </view>
+ <view class="detail">
+ <text>鍙戣揣閫氱煡鍗曟暟閲忥細</text>{{item['鏁伴噺']}}
+ </view>
+ <view class="detail">
+ <text>鍓╀綑鍙嚭搴撴暟閲忥細</text>{{item['鏁伴噺'] - item['宸插叧鑱旀暟閲�']}}
+ </view>
+ </view>
+ <!-- <view class="more" v-if="operations != index">
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view> -->
+
+ <!-- <view class="op" v-if="operations == index">
+ <input class="input1" type="number" v-model="SeOutNumber" />
+ <button class="op3" size="mini" plain @tap.stop="submit(item)">鍑哄簱</button>
+ <button class="op5" size="mini" plain
+ @tap.stop="operations = -1,SeOutNumber = 0">鍙栨秷鎿嶄綔</button>
+ </view> -->
+ </uni-card>
+ </view>
+ </view>
+ <view class="pagination-zone">
+ <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total"
+ :current="paginationMeta.current" @change="onPaginationChangeHandler"></uni-pagination>
+ </view>
+ </view>
+</template>
+
+<script>
+ import getDateTime from '@/utils/getdateTime.js';
+ import {
+ CommonUtils
+ } from '../../utils/common'
+ import {
+ getUserInfo
+ } from '../../utils/auth'
+ import {
+ MpaasScan
+ } from '@/utils/mpaasScan.js'
+ export default {
+
+ data() {
+ return {
+ operations: -1,
+ navHeight: 0,
+ HWHNameList: [],
+ arrayHWHName: [],
+ HStockPlaceNameList: [],
+ arrayHStockPlaceName: [],
+ HIsStockMgr: false,
+ scrollTop: 0,
+ HBarCode: '',
+ HMaterialID: '',
+ HBillNo: '',
+ HCustomer: '',
+ HSeller: '',
+ SeOutNumber: 0,
+
+ materMeta: {},
+
+
+ paginationMeta: {
+ current: 1,
+ total: 0,
+ pageSize: 30,
+ },
+
+ listData: [],
+ listDataShow: [],
+
+ hform: {
+ HBillNo: '',
+ HInterID: '',
+ HBillSubType: 1205,
+ HDate: getDateTime.dateTimeStr('y-m-d'),
+ BillType: 1402,
+ HBillerID: uni.getStorageSync('HBillerID'),
+ HRedBlueFlag: false,
+
+
+ // 閫氳繃item璧嬪��
+ HMainSourceInterID: '0',
+ HMainSourceEntryID: '0',
+ HMainSourceBillType: '',
+ HMainSourceBillNo: '',
+ "HEmpName": "",
+ "HEmpID": "",
+ "HDeptName": "",
+ "HDeptID": "0",
+ "HManagerName": "",
+ "HManagerID": "0",
+ "HSupName": "",
+ "HSupID": "",
+ "HLinkMan": "",
+ "HLinkPhone": "",
+ HSecManagerName: getUserInfo().HSecManager,
+ HSecManagerID: getUserInfo().HSecManagerID,
+ HKeeperName: getUserInfo().HKeeper,
+ HKeeperID: getUserInfo().HKeeperID,
+ "HRemark": "",
+ "HProjectNumber": "",
+ "HProjectID": "0",
+ "HProjectName": "",
+ "HGroupName": "",
+ "HGroupID": "0",
+ HWHName: getUserInfo().HWHName,
+ HWHID: getUserInfo().HWhID,
+ "HConveyCompName": "",
+ "HConveyCompID": "0",
+ "HConveyTypeName": "",
+ "HConveyTypeID": "0",
+ "HConveyMoney": "0",
+ "HCarriage": "0",
+ "HSTOCKORGID": uni.getStorageSync("OrganizationID"),
+ "HOWNERID": uni.getStorageSync("OrganizationID"),
+ "HSCWHName": "",
+ "HSCWHID": "0",
+ "HCheckStatusMan": "",
+ "HExplanation": "",
+ "HInnerBillNo": "",
+ "HCurName": "",
+ "HCurID": "",
+ "HExRate": "",
+ "HSellSName": "",
+ "HSellSID": "0",
+ "HCusBalance": "0",
+ "HCreditRating_Now": "0",
+ "HAvailableBalance": "0",
+ "HPriceType": "鎴愭湰浠�",
+ "HOrgID": uni.getStorageSync("OrganizationID"),
+ "HMaker": getUserInfo()['Czymc'],
+ "HUpDater": "",
+ "HChecker": "",
+ "HMakeDate": getDateTime.dateTimeStr('y-m-d'),
+ "HUpDateDate": "",
+ "HCheckDate": "",
+ "HCloseMan": "",
+ "HDeleteMan": "",
+ "HCloseDate": "",
+ "HDeleteDate": "",
+ },
+
+ subform: [{
+ "HMaterID": '',
+ "鐗╂枡浠g爜": "",
+ "鐗╂枡鍚嶇О": "",
+ "瑙勬牸鍨嬪彿": "",
+ "HUnitID": '',
+ "璁¢噺鍗曚綅": "",
+ "HQtyMust": "",
+ "HQty": '',
+ "HPieceQty": "",
+ "HPrice": '',
+ "HTaxPrice": '',
+ "HTaxRate": '',
+ "HMoney": '',
+ "HTaxMoney": '',
+ "HWHID": getUserInfo().HWhID,
+ "鍙戣揣浠撳簱": getUserInfo().HWHName,
+ "HRemark": "",
+ "HQty_Full": "0",
+ "HQty_Empty": "0",
+ "HQty_Back": "0",
+ "HCostPrice": "0",
+ "HCostMoney": "0",
+ "HSalePrice": "0",
+ "HSeOrderInterID": "0",
+ "HSeOrderEntryID": "0",
+ "HSeOrderBillNo": "",
+ "HSourceInterID": "0",
+ "HSourceEntryID": "0",
+ "HSourceBillNo": "",
+ "HSourceBillType": "",
+ "HRelationQty": "0",
+ "HRelationMoney": "0",
+ "HSPID": "0",
+ "HSPName": "",
+ "HSPGroupID": "0",
+ "HSPGroupName": "",
+ "HSCWHID": "0",
+ "HSCWHName": "",
+ "HSCSPID": "0",
+ "HSCSPName": "",
+ "HBatchNo": "",
+ "HPOOrderInterID": "0",
+ "HPOOrderEntryID": "0",
+ "HPOOrderBillNo": "",
+ "HPropertyID": "0",
+ "HPropertyName": "",
+ "HSecUnitID": "0",
+ "HSecUnitName": "",
+ "HSecUnitRate": "0",
+ "HEngineNum": "",
+ "HUnderPanNum": "",
+ "HLeaveFactCard": "",
+ "HReqBuyQty": "0",
+ "HReqOutQty": "0",
+ "HCurrentInventory": "0",
+ }]
+ }
+ },
+ props: {
+ HBillType: {
+ type: [String, Number],
+ required: true
+ },
+ HSourceBillType: {
+ type: [String, Number],
+ required: true
+ },
+ HStockOrgID: {
+ type: [String, Number],
+ required: true
+ },
+ },
+ methods: {
+ popupChangeHandler(e) {
+ if (e.show === true) {
+ this.getBillList()
+ } else {
+ // 娓呯悊璧勬簮
+ this.size = 20
+ this.curPage = 1
+ this.length = 0
+ this.page = 0
+ this.HSourceBillNo = ''
+ this.HMater = ''
+ this.HCustom = ''
+ this.HBillList = []
+ }
+ },
+ exit() {
+ this.$refs.popup.close();
+ },
+ search() {
+ this.getBillList()
+ },
+ showPopup() {
+ this.$refs.popup.open();
+ },
+ clickCard(interid, billno) {
+ uni.$emit('BillSelectComplete', {
+ HInterID: interid,
+ HBillNo: billno
+ })
+ // this.exit()
+ },
+ clearPage() {
+ this.HMaterialID = ''
+ this.HBillNo = ''
+ this.HCustomer = ''
+ this.HSeller = ''
+ this.SeOutNumber = 0
+ this.operations = -1
+ },
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ this.HBarCode = ret.resp_result
+ this.getCode(ret.resp_result)
+ })
+ },
+ exit() {
+ uni.navigateBack()
+ },
+ async getCode(BarCode) {
+ console.log(BarCode)
+ try {
+ let barCodeMeta = await this.getMaterialInfo(BarCode)
+ console.log('barCodeMeta: ', barCodeMeta);
+ this.HMaterialID = barCodeMeta[0]['HMaterID']
+ this.getMater()
+ console.log('鎵ц: getMater')
+ this.cmdSearch()
+ } catch (err) {
+ return
+ }
+ },
+ async submit(item) {
+ console.log('item: ', item);
+ console.log('this.SeOutNumber: ', this.SeOutNumber);
+ if (this.SeOutNumber < 1) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鍑哄簱鏁伴噺涓嶅緱灏忎簬1'
+ })
+ }
+ if (item['鏁伴噺'] - item['宸插叧鑱旀暟閲�'] < this.SeOutNumber) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鍑哄簱鏁伴噺涓嶅緱澶т簬鍓╀綑鍙嚭搴撴暟閲�'
+ })
+ }
+
+ try {
+ let MaxNum = await this.getMaxNum()
+ let {
+ HBillNo,
+ HInterID
+ } = MaxNum[0]
+
+ this.hform.HBillNo = HBillNo
+ this.hform.HInterID = HInterID
+ this.hform.HMainSourceBillNo = item['鍗曟嵁鍙�']
+ this.hform.HMainSourceBillType = item['HBillType']
+ this.hform.HMainSourceInterID = item['hmainid']
+ this.hform.HMainSourceEntryID = item['hsubid']
+ this.hform.HEmpName = item['涓氬姟鍛�']
+ this.hform.HEmpID = item['HEmpID']
+ this.hform.HDeptID = item['HDeptID']
+ this.hform.HDeptName = item['閮ㄩ棬']
+ this.hform.HSupName = item['瀹㈡埛']
+ this.hform.HSupID = item['HCusID']
+ this.hform.HLinkMan = item['HLinkMan']
+ this.hform.HLinkPhone = item['鑱旂郴鐢佃瘽']
+ this.hform.HManagerID = item['HManagerID']
+ this.hform.HManagerName = item['涓荤']
+ this.hform.HProjectID = item['HProjectID']
+ this.hform.HProjectName = item['椤圭洰鍚嶇О']
+ this.hform.HProjectNumber = item['椤圭洰缂栫爜']
+ this.hform.HWHID = item['HWHID']
+ this.hform.HWHName = item['鍙戣揣浠撳簱']
+ this.hform.HCurName = item['甯佸埆']
+ this.hform.HCurID = item['HCurID']
+ this.hform.HExRate = Number(item['姹囩巼'])
+ this.hform.HSellSID = '0'
+ this.hform.HSellSName = item['閿�鍞柟寮�']
+ this.hform.HChecker = getUserInfo()["Czymc"]
+ let HQty = this.SeOutNumber;
+ let HPrice = item['鍗曚环']; //鍗曚环
+ let HMoney = HQty * HPrice;
+ console.log("materMeta", this.materMeta)
+ this.subform[0] = {
+ 'HMaterID': this.materMeta['HItemID'],
+ "鐗╂枡浠g爜": this.materMeta['鐗╂枡浠g爜'],
+ "鐗╂枡鍚嶇О": this.materMeta['鐗╂枡鍚嶇О'],
+ "瑙勬牸鍨嬪彿": this.materMeta['瑙勬牸鍨嬪彿'],
+ "HUnitID": this.materMeta['HUnitID'],
+ "璁¢噺鍗曚綅": this.materMeta['鍩烘湰璁¢噺鍗曚綅'],
+ "HQty": this.SeOutNumber,
+ "HPieceQty": "0",
+ "HPrice": HPrice,
+ "HTaxPrice": "0",
+ "HTaxRate": "0",
+ "HMoney": HMoney,
+ "HTaxMoney": "0",
+ "HWHID": item.HWHID,
+ "鍙戣揣浠撳簱": item['鍙戣揣浠撳簱'],
+ "HRemark": "",
+ "HQty_Full": "0",
+ "HQty_Empty": "0",
+ "HQty_Back": "0",
+ "HCostPrice": "0",
+ "HCostMoney": "0",
+ "HSalePrice": "0",
+ "HSeOrderInterID": item.hmainid,
+ "HSeOrderEntryID": item.hsubid,
+ "HSeOrderBillNo": item.鍗曟嵁鍙�,
+ "HSourceInterID": item.hmainid,
+ "HSourceEntryID": item.hsubid,
+ "HSourceBillNo": item.鍗曟嵁鍙�,
+ "HSourceBillType": item.HBillType,
+ "HRelationQty": "0",
+ "HRelationMoney": "0",
+ 'HSPID': "0",
+ 'HSPName': "",
+ 'HSPGroupID': "0",
+ "HSPGroupName": "",
+ 'HSCWHID': "0",
+ 'HSCWHName': "",
+ 'HSCSPID': "0",
+ 'HSCSPName': "",
+ 'HBatchNo': "",
+ 'HPOOrderInterID': "0",
+ 'HPOOrderEntryID': "0",
+ 'HPOOrderBillNo': "",
+ 'HPropertyID': "0",
+ 'HPropertyName': "",
+ 'HSecUnitID': "0",
+ 'HSecUnitName': "",
+ 'HSecUnitRate': "0",
+ 'HEngineNum': "",
+ 'HUnderPanNum': "",
+ 'HLeaveFactCard': "",
+ 'HReqBuyQty': "0",
+ 'HReqOutQty': "0",
+ 'HCurrentInventory': "0"
+ }
+ await this.$nextTick()
+
+
+
+ let sMainStr = JSON.stringify(this.hform)
+ let sSubStr = JSON.stringify(this.subform)
+ let sMainSub = sMainStr + ';' + sSubStr + ';' + getUserInfo()["Czymc"] + ';' + 1;
+
+ CommonUtils.doRequest2({
+ method: 'POST',
+ url: '/Kf_SellOutBill/SaveSellOutBillList',
+ data: {
+ msg: sMainSub
+ },
+ resFunction: async (res) => {
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ await this.set_CheckBill()
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+
+ }
+ })
+
+ } catch {
+ return
+ }
+
+
+ },
+
+ async getMaxNum() {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/WEBSController/GetMaxBillNoAndID_Json",
+ data: {
+ "HBillType": '1205'
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message,
+ data
+ } = res.data
+ if (count == 1) {
+ resolve(data)
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ reject()
+ }
+ },
+ errFunction: () => {
+ reject()
+ }
+ })
+ })
+ },
+ set_CheckBill() {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/Kf_SellOutBill/AuditKf_SellOutBill",
+ data: {
+ "HInterID": this.hform.HInterID,
+ "IsAudit": 0,
+ "CurUserName": getUserInfo()['Czymc']
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message,
+ data
+ } = res.data
+ if (count == 1) {
+ uni.showModal({
+ title: '鎻愪氦鎴愬姛',
+ content: '鏄惁缁х画鍑哄簱?',
+ success: (res) => {
+ if (res.confirm) {
+ this.clearPage()
+ this.getCode()
+ } else if (res.cancel) {
+ uni.navigateBack()
+ }
+ }
+ });
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: '鎻愪氦鎴愬姛锛岃嚜鍔ㄥ鏍稿け璐ワ紝璇锋墜鍔ㄥ鏍�'
+ })
+ }
+ },
+ })
+ })
+ },
+ async getMaterialInfo(BarCode) {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/Gy_BarCodeBillList/GetBarCodeBillList",
+ data: {
+ sWhere: ` and 鏉$爜缂栧彿 = N'${BarCode}'`,
+ user: getUserInfo()['Czymc']
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message,
+ data
+ } = res.data
+ if (count == 1) {
+ resolve(data)
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ reject()
+ }
+ },
+ errFunction: () => {
+ reject()
+ }
+ })
+ })
+ },
+ getMater() {
+ CommonUtils.doRequest2({
+ url: '/Gy_Material/page',
+ data: {
+ sWhere: ` and 1 = 1 and HItemID = ${this.HMaterialID}`,
+ user: getUserInfo()['Czymc'],
+ // Organization: uni.getStorageSync('Organization'),
+ Organization: uni.getStorageSync('Organization'),
+ page: 1,
+ size: 50,
+ },
+ resFunction: (res) => {
+ let {
+ count,
+ Message,
+ data
+ } = res.data
+ if (count == 1) {
+ this.materMeta = data[0]
+
+ this.$forceUpdate()
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ onArrayHWHNameChangeHandler(e) {
+ let index = this.HWHNameList.findIndex(p => p.HName == e)
+ if (index != -1) {
+ this.hform.HWHID = this.HWHNameList[index].HItemID
+ this.HIsStockMgr = this.HWHNameList[index].HIsStockMgr
+ }
+ },
+ getWHInfo() {
+ CommonUtils.doRequest(
+ "/Web/GetWarehouseList_Json_New", {
+ Warehouse: "",
+ HOrgID: uni.getStorageSync('OrganizationID')
+ },
+ (res) => {
+ let res1 = res.data
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.HWHNameList = data
+ for (var i = 0; i < data.length; i++) {
+ this.arrayHWHName[i] = data[i]["HName"]
+ }
+ } else {
+ uni.showToast({
+ title: '浠撳簱鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ )
+ },
+ onArrayHStockPlaceNameChangeHandler() {
+ let index = this.HStockPlaceNameList.findIndex(p => p.HName == e)
+ if (index != -1) {
+ this.hform.HStockPlaceID = this.HStockPlaceNameList[index].HItemID
+ }
+ },
+ getStockPlaceInfo() {
+ CommonUtils.doRequest(
+ "/WEBSController/GetStockPlaceList_Json", {
+ StockPlace: '',
+ HWhID: this.hform.HWHID,
+ HStockOrgID: uni.getStorageSync('OrganizationID')
+ },
+ (res) => {
+ let res1 = res.data
+ console.log(res1)
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.HStockPlaceNameList = data
+ for (var i = 0; i < data.length; i++) {
+ this.arrayHStockPlaceName[i] = data[i]["HWhName"]
+ }
+ } else {
+ uni.showToast({
+ title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ )
+ },
+ cmdSearch() {
+ let sWhere = ''
+ if (CommonUtils.isEmpty(this.HMaterialID)) {
+ return uni.showToast({
+ icon: 'none',
+ title: '杩樻湭閫氳繃鎵爜鑾峰彇鐗╂枡缂栫爜锛岃鍏堟壂鐮�!'
+ })
+ }
+ sWhere += ` and HMaterID = ${this.HMaterialID} and 鏁伴噺 > 宸插叧鑱旀暟閲廯
+ if (!CommonUtils.isEmpty(this.HBillNo)) {
+ sWhere += ` and 鍗曟嵁鍙� = N'${this.HMaterialID}'`
+ }
+ if (!CommonUtils.isEmpty(this.HCustomer)) {
+ sWhere += ` and 瀹㈡埛 = N'${this.HCustomer}'`
+ }
+ if (!CommonUtils.isEmpty(this.HSeller)) {
+ sWhere += ` and 涓氬姟鍛� = N'${this.HSeller}'`
+ }
+
+ CommonUtils.doRequest2({
+ url: '/Xs_SeOutStockBill/list',
+ data: {
+ 'user': getUserInfo()['Czymc'],
+ 'sWhere': sWhere
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ console.log('Xs_SeOutStockBill data: ', data);
+ this.listData = data
+ this.paginationMeta.total = data.length
+ this.onPaginationChangeHandler({
+ current: 1
+ })
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ },
+ async onPaginationChangeHandler({
+ current
+ }) {
+ this.listDataShow =
+ this.listData.slice((current - 1) * this.paginationMeta.pageSize,
+ current * this.paginationMeta.pageSize)
+
+ }
+ },
+ onLoad() {
+
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .page {
+ /* #ifdef APP */
+ height: calc(80vh);
+ /* #endif */
+ /* #ifndef APP */
+ height: calc(80vh - 44px);
+ /* #endif */
+ box-sizing: border-box;
+ padding: 20rpx 10rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+ position: relative;
+
+ .button-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding: 20rpx 0;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex-wrap: wrap;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #ff5722;
+ color: #fff;
+ }
+ }
+
+ .search-condition-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding: 0 60rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ align-items: center;
+
+ .left {
+ font-size: 32rpx;
+ width: 6em;
+ }
+
+ .right {
+ flex: 1;
+ padding: 8rpx 16rpx;
+
+ .search {
+ width: 32rpx;
+ height: 32rpx;
+ }
+ }
+
+ .general {
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .disabled {
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ .uni-combox {
+ box-sizing: border-box;
+ padding: 0;
+ }
+ }
+ }
+
+ .info-list-zone {
+ flex: 1;
+ overflow-y: auto;
+
+ .card-item {
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ }
+ }
+
+ .pagination-zone {
+ height: 80rpx;
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+ justify-content: center;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ margin-top: 20rpx;
+ gap: 12rpx;
+ height: 100%;
+
+ button {
+ padding: 0;
+ width: 120rpx;
+ font-size: 25rpx;
+ }
+
+ .input1 {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ padding: 8rpx 12rpx;
+ border: #555 solid 1px;
+ border-radius: 12rpx;
+ font-size: 25rpx;
+
+ }
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op2 {
+ border: 1px solid #d98d00;
+ color: #d98d00;
+ }
+
+ .op3 {
+ border: 1px solid #3a78ff;
+ color: #3a78ff;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ .op5 {
+ border: 1px solid #888;
+ color: #888;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/shengchanbuliao/form.vue b/pages/shengchanbuliao/form.vue
index 89042cf..849d1a3 100644
--- a/pages/shengchanbuliao/form.vue
+++ b/pages/shengchanbuliao/form.vue
@@ -1042,10 +1042,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
diff --git a/pages/shengchanlingliaoshengdan/form.vue b/pages/shengchanlingliaoshengdan/form.vue
index 711b5a5..0244ed8 100644
--- a/pages/shengchanlingliaoshengdan/form.vue
+++ b/pages/shengchanlingliaoshengdan/form.vue
@@ -1104,10 +1104,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
diff --git a/pages/shengchanrukushengdan/form.vue b/pages/shengchanrukushengdan/form.vue
index dac446d..02fe440 100644
--- a/pages/shengchanrukushengdan/form.vue
+++ b/pages/shengchanrukushengdan/form.vue
@@ -1069,7 +1069,7 @@
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
this.hform.HMainSourceBillType = data.hSourceBillTypeField
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1102,10 +1102,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
@@ -1275,7 +1307,7 @@
this.hform.HMainSourceBillType = data.HSourceBillType
this.hform.HSourceBillNo = data.HSourceBillNo
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data.HSourceBillType)
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
this.hform.HMainSourceBillType = data.HSourceBillType
diff --git a/pages/shouliaotongzhi/table_son.vue b/pages/shouliaotongzhi/table_son.vue
index d59c264..0d136ff 100644
--- a/pages/shouliaotongzhi/table_son.vue
+++ b/pages/shouliaotongzhi/table_son.vue
@@ -50,6 +50,12 @@
<input v-model="baseInfo.HBQty" disabled />
</view>
</view>
+ <view class="form-item">
+ <view class="title">娆惧彿:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HCoilNO" disabled />
+ </view>
+ </view>
<view class="buttons">
<button class="btn-b" size="mini" type="default" @tap="getList()">鏉$爜鐢熸垚</button>
<!-- <button class="btn-c" size="mini" type="default" @tap="searchLabelPrinter()">鎼滅储鎵撳嵃鏈�</button> -->
@@ -72,6 +78,9 @@
<view class="detail">
<text>鏁伴噺锛�</text>{{item.鏁伴噺}}
</view>
+ <view class="detail">
+ <text>娆惧彿锛�</text>{{item.娆惧彿}}
+ </view>
<view class="detail" style="width: 100%;">
<text>鏉$爜缂栧彿锛�</text>{{item.鏉$爜缂栧彿}}
</view>
@@ -171,6 +180,7 @@
HSupNumber: '',
HSupName: '',
HUnitID: '',
+ HBillType: '',
HPcsName: '',
HSupNameShort: '',
HMTONo: '',
@@ -235,10 +245,11 @@
if (res.data.count == 1) {
var data = res.data.data
this.baseInfo = Object.assign(this.baseInfo, {
- HMainID: data[0].linterid,
+ HMainID: data[0].hmainid,
HSubID: data[0].hsubid,
HBillNo: data[0].鍗曟嵁鍙�,
HSourceBillNo: data[0].鍗曟嵁鍙�,
+ HBillType: data[0]['HBillType'],
HInnerBillNo: data[0].閲囪喘璁㈠崟鍙�,
HMaterID: data[0].HMaterID,
HMaterNumber: data[0].鐗╂枡浠g爜,
diff --git a/pages/tiaomachaima/tiaomachaima2.vue b/pages/tiaomachaima/tiaomachaima2.vue
new file mode 100644
index 0000000..92c2982
--- /dev/null
+++ b/pages/tiaomachaima/tiaomachaima2.vue
@@ -0,0 +1,497 @@
+<template>
+ <view class="container">
+ <view class="header">
+ <view class="item">
+ <view class="left">鏉$爜缂栧彿锛�</view>
+ <view class="right">
+ <input name="HBarCode" v-model="barCodeInfoMeta.barCodeNo" placeholder="璇锋壂鎻忔潯鐮�"
+ @blur="searchbarCodeInfo" />
+ </view>
+ <view>
+ <uni-icons type="scan"
+ style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;font-weight: 500;"
+ size="20" @click="toScanCode"></uni-icons>
+ </view>
+ </view>
+ <view class="item">
+ <view class="left">鎷嗙爜鏁伴噺锛�</view>
+ <view class="right">
+ <input type="number" name="HSplitNum" v-model="barCodeInfoMeta.splitNum" placeholder="璇疯緭鍏ユ媶鐮佹暟閲�" />
+ </view>
+ </view>
+ <view class="item">
+ <view class="left">鍒跺崟浜猴細</view>
+ <view class="right">
+ <input type="text" disabled name="HMaker" v-model="barCodeInfoMeta.billMaker"
+ placeholder="璇疯緭鍏ュ埗鍗曚汉" />
+ </view>
+ </view>
+ <view class="operation-zone">
+ <button class="btn-c" @click="searchbarCodeInfoMeta">鎷嗙爜</button>
+ <button type="default" :class="cantGenerate?'':'btn-c'" @click="SaveBarCodeCreate"
+ :disabled="cantGenerate">鐢熸垚</button>
+ <button type="default" :class="cantPrint?'':'btn-c'" @click="PrintHBarCode" :disabled="cantPrint" >鎵撳嵃</button>
+ </view>
+ </view>
+ <view class="divide"></view>
+ <view class="content">
+ <view class="barcode-detail" v-show="CommonUtils.isEmpty(Object.assign(barCodeInfo, {})) === false">
+ <view class="title">鏉$爜淇℃伅</view>
+ <uni-card>
+ <view class="detail" style="display: none;">
+ <text>鏉$爜ID锛�</text>{{barCodeInfo['HItemID'] || '0'}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜缂栧彿锛�</text>{{barCodeInfo['鏉$爜缂栧彿'] || ''}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜鍘熸暟閲忥細</text>{{barCodeInfo['鏁伴噺'] || '0'}}
+ </view>
+ <view class="detail">
+ <text>鍓╀綑鏁伴噺锛�</text>{{barCodeInfo['鍓╀綑鏁伴噺'] || '0'}}
+ </view>
+ <view class="dWetail">
+ <text>鐗╂枡缂栫爜锛�</text>{{barCodeInfo['鐗╂枡浠g爜'] || ''}}
+ </view>
+ <view class="detail">
+ <text>鐗╂枡鍚嶇О锛�</text>{{barCodeInfo['鐗╂枡鍚嶇О'] || ''}}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{barCodeInfo['瑙勬牸鍨嬪彿'] || ''}}
+ </view>
+ <view class="detail">
+ <text>璁¢噺鍗曚綅锛�</text>{{barCodeInfo['璁¢噺鍗曚綅'] || ''}}
+ </view>
+ </uni-card>
+ </view>
+ <view class="divide"></view>
+ <view class="barcode-split" v-show="barCodeSplitInfo.length>0">
+ <view class="title">鏉$爜鎷嗙爜</view>
+ <view class="barcode-split-list" v-for="(item,index) in barCodeSplitInfo" :key="index">
+ <uni-card @tap="ModityHQty(item)">
+ <view class="detail">
+ <text>鏉$爜缂栧彿锛�</text>{{item['HBarCode'] || ''}}
+ </view>
+ <view class="detail split-num">
+ <text>鎷嗗垎鏁伴噺锛�</text>{{item['HSplitNum'] || '0'}}
+ </view>
+ <view class="detail">
+ <text>鐗╂枡浠g爜锛�</text>{{item['HNumber'] || ''}}
+ </view>
+ <view class="detail">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item['HName'] || ''}}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item['HModel'] || ''}}
+ </view>
+ <view class="detail">
+ <text>璁¢噺鍗曚綅锛�</text>{{barCodeInfo['璁¢噺鍗曚綅'] || ''}}
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ </view>
+ <view class="over" v-if="barCodeSplitInfo.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="barCodeSplitInfo.length != 0">宸插埌搴�</view>
+ <view>
+ <!-- 杈撳叆妗嗙ず渚� -->
+ <uni-popup ref="inputDialog" type="dialog">
+ <uni-popup-dialog ref="inputClose" mode="input" title="璇疯緭鍏ユ媶鐮佹暟閲�" :value="dialogVal" placeholder="璇疯緭鍏ユ媶鐮佹暟閲�"
+ @confirm="dialogInputConfirm"></uni-popup-dialog>
+ </uni-popup>
+ </view>
+ <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
+ </labelPrinterComponentVue>
+ </view>
+</template>
+
+<script>
+ import labelPrinterComponentVue from '../../components/labelPrinterComponent/labelPrinterComponent.vue';
+ import {
+ CBar,
+ CBox,
+ CForm,
+ CImage,
+ CLine,
+ CCodeRotation,
+ CCodeType,
+ CPage,
+ CText,
+ CFont,
+ CBold,
+ CRotation,
+ CInverse,
+ CMag,
+ CQRCode,
+ CCorrectLevel,
+ CSN,
+ CStatus,
+ CPCL,
+ } from "@psdk/cpcl";
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import {
+ CommonUtils
+ } from "@/utils/common.js"
+ export default {
+ data() {
+ return {
+ CommonUtils,
+ userInfo: getUserInfo(),
+ serverUrl: 'http://192.168.2.227:8082/API',
+ barCodeInfoMeta: {
+ barCodeNo: "",
+ splitNum: "",
+ billMaker: getUserInfo().HEmpName,
+ billMakerID: getUserInfo().HEmpID
+ },
+ barCodeInfo: {
+
+ },
+ barCodeSplitInfo: [],
+ dialogVal: 0,
+ itemCache: {},
+ cantGenerate: true,
+ cantPrint:true,
+ printInfo: ""//鎵撳嵃
+ };
+ },
+ components: {
+ labelPrinterComponentVue
+ },
+ methods: {
+ doRequest(url, data, resFunction, errFunction, method) {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ })
+ uni.request({
+ method: method || "GET",
+ url: this.serverUrl + url,
+ data: data || "",
+ success: (res) => {
+ if (typeof resFunction === 'function') {
+ resFunction.call(this, res)
+ } else if (typeof errFunction === 'undefined') {
+ return
+ } else {
+ throw new TypeError("璁块棶鎴愬姛鍥炶皟鍑芥暟绫诲瀷寮傚父!")
+ }
+ },
+ fail: (err) => {
+ uni.showToast({
+ icon: "error",
+ title: "鎺ュ彛璁块棶寮傚父!",
+ duration: 2000
+ })
+ if (typeof errFunction === 'function') {
+ errFunction.call(this, err)
+ } else if (typeof errFunction === 'undefined') {
+ return
+ } else {
+ throw new TypeError("璁块棶澶辫触鍥炶皟鍑芥暟绫诲瀷寮傚父!")
+ }
+ }
+ })
+ uni.hideLoading()
+ },
+ //鎽勫儚澶磋皟鐢�
+ async searchbarCodeInfo() {
+ await this.$nextTick()
+ let urlEncode =
+ `/Gy_BarCodeBillList/page?sWhere= and 鏉$爜缂栧彿=\'\'${this.barCodeInfoMeta.barCodeNo}\'\'&user=${this.userInfo.HEmpName}&page=1&size=1`
+ .toString()
+ if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) == true) {
+ return uni.showToast({
+ icon: "fail",
+ title: "鏉$爜缂栧彿涓嶈兘涓虹┖!"
+ })
+ }
+ this.doRequest(
+ urlEncode,
+ null,
+ function(res) {
+ console.log(res)
+ let res1 = res.data
+ let {data,count} = res1
+ if (count > 0) {
+ this.barCodeInfo = data[0]
+ this.barCodeSplitInfo= []
+ }
+ },
+ function(err) {
+ console.err(err)
+ }
+ )
+ },
+ //鎷嗙爜鎸夐挳璋冪敤
+ async searchbarCodeInfoMeta() {
+ this.cantGenerate = true
+ this.cantPrint=true
+ if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) === true) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鏉$爜缂栧彿涓嶅緱涓虹┖!'
+ });
+ }
+ if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鎷嗗垎鏁伴噺涓嶅緱涓虹┖!'
+ });
+ }
+ if (CommonUtils.isEmpty(this.barCodeInfoMeta.splitNum, true) === true) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鎷嗗垎鏁伴噺涓嶅緱涓虹┖!'
+ });
+ }
+ if (parseFloat(this.barCodeInfoMeta.splitNum) > parseFloat(this.barCodeInfo['鏁伴噺'])) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鍘熸暟閲�!'
+ });
+ }
+ this.doRequest(
+ "/Sc_BarCode/SplitBarCode_Sub", {
+ HBarCodeNo: this.barCodeInfoMeta.barCodeNo
+ },
+ function(res) {
+ console.log(res)
+ this.barCodeSplitInfo = []
+ if (res.data.count > 0) {
+
+ if (res.data.data.length < 1) {
+ return uni.showToast({
+ icon: 'none',
+ title: Message
+ });
+ }
+
+ //鎷嗗垎鏉$爜锛氭暟閲忎负 splitNum
+ let barCodeItem1 = JSON.parse(JSON.stringify(res.data.data.SubBarCodes[0]));
+ barCodeItem1.HSplitNum = this.barCodeInfoMeta.splitNum;
+ barCodeItem1.HBarCode = res.data.data.NextBarCode;
+ this.barCodeSplitInfo.push(barCodeItem1);
+
+ //鏇存柊鍘熷厛鏉$爜鏁伴噺
+ this.barCodeInfo['鍓╀綑鏁伴噺'] = this.barCodeInfo['鏁伴噺'] - this.barCodeInfoMeta.splitNum;
+
+ this.cantGenerate = false;
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: '娌℃湁鎵惧埌瀵瑰簲鐨勫崟鎹�'
+ });
+ }
+ },
+ function(err) {
+ console.error(err)
+ }
+ )
+ },
+ //淇濆瓨鏂规硶
+ SaveBarCodeCreate() {
+ // 鏍¢獙鎷嗙爜鏁伴噺
+ let sum = this.barCodeSplitInfo.reduce((acc, obj) => {
+ return acc + obj["HSplitNum"]
+ }, 0)
+
+ if (sum > this.barCodeInfo["HQty"]) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鎷嗙爜鏁伴噺鍜屼笉寰楀ぇ浜庢潯鐮佹暟閲�'
+ });
+ }
+ let msg =
+ `${this.barCodeInfoMeta["barCodeNo"]};${this.barCodeInfoMeta["splitNum"]};${JSON.stringify(this.barCodeSplitInfo)};${this.userInfo["HEmpName"]}`
+ this.doRequest(
+ "/Sc_BarCode/SplitBarCode_Save", {
+ msg: msg
+ },
+ function(res) {
+ if (res.data.code == 1) {
+ this.cantGenerate = true
+ this.cantPrint=false
+ uni.showToast({
+ title: '鐢熸垚鎴愬姛!'
+ });
+ }else{
+ this.cantGenerate = false
+ uni.showToast({
+ title: res.data.Message
+ });
+ }
+
+ },
+ function(err) {
+ console.err(err)
+ },
+ "POST"
+ )
+
+ },
+ //鎵撳嵃鎸夐挳
+ async PrintHBarCode() {
+ if (this.$printer.isConnected() === false) {
+ this.$refs.labelPrinter.openPopup()
+ }
+ else
+ {
+ let HBarCodeNoStr =`${this.barCodeSplitInfo[0]['HBarCode']}`
+ this.printInfo = `! 0 200 200 400 1
+ PAGE-WIDTH 608
+ SETQRVER 3
+ B QR 475 15 Q 0 U 3
+ LA,${HBarCodeNoStr}
+ ENDQR
+ T 24 0 0 30 渚涘簲鍟�: ${this.lailiaoInfo.HSupName}
+ T 55 0 0 55 (Supplier)
+ T 24 0 0 75 渚涘簲鍟嗘枡鍙�: ${this.lailiaoInfo.HMaterNumber}
+ T 55 0 0 100 (Supplier Sku No.)
+ T 24 0 0 120 鐗╂枡鍚嶇О: ${this.lailiaoInfo.HMaterName}
+ T 55 0 0 145 (Material Code)
+ T 24 0 0 165 娆惧彿: ${this.lailiaoInfo.HCoilNO}
+ T 55 0 0 190 (Style No.)
+ T 24 0 300 165 瀹㈡埛缂栧彿: ${this.lailiaoInfo.HFactory}
+ T 55 0 300 190 (Consumer No.)
+ T 24 0 0 210 鍒嗙粍: ${this.lailiaoInfo.HFurnaceNO || ''}
+ T 55 0 0 235 (Group)
+ T 24 0 300 210 瑙勬牸: ${this.lailiaoInfo.HMaterModel}
+ T 55 0 300 235 (SKU NO.)
+ T 24 0 0 255 鏁伴噺: ${ parseFloat(this.lailiaoInfo.HQty || 0).toFixed(0) } ${pcsInfo}
+ T 55 0 0 280 (Quantity)
+ T 24 0 300 255 鏃ユ湡: ${this.lailiaoInfo.HDate || ''}
+ T 55 0 300 280 (Date)
+ T 24 0 0 300 妫�楠屽憳:
+ T 55 0 0 325 (QC)
+ T 24 0 300 300 閲囪喘鍗曞彿: ${this.lailiaoInfo.HBillNo || ''}
+ T 55 0 300 325 (Purchase Order No.)
+ T 24 0 0 345 妫�楠岀粨鏋�:
+ T 55 0 0 370 (Inspection status)
+ BOX 240 345 260 365 4
+ T 24 0 270 345 鍚堟牸
+ T 55 0 250 370 (Pass)
+ BOX 340 345 360 365 4
+ T 24 0 370 345 涓嶅悎鏍�
+ T 55 0 370 370 (Fail)
+ BOX 460 345 480 365 4
+ T 24 0 490 345 鐗归噰
+ T 55 0 440 370 (Spec. accepted)
+ FORM
+ PRINT`
+ await this.$nextTick(() => {
+ this.$refs.labelPrinter.execPrint()
+ })
+ }
+ },
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.CommonUtils.isEmpty(ret.resp_result) === false) {
+ console.log('鏉$爜鍐呭锛�' + ret.resp_result);
+ this.barCodeInfoMeta.barCodeNo = ret.resp_result
+
+ this.searchbarCodeInfo()
+ }
+ })
+ }
+ },
+ onLoad() {
+ }
+ }
+</script>
+
+<style lang="scss">
+ * {
+ box-sizing: border-box;
+ }
+
+ input {
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ line-height: 30rpx;
+ }
+
+ button {
+ padding: 0;
+ width: 150rpx;
+ font-size: 25rpx;
+ }
+
+ .uni-card {
+ margin: 0 !important;
+ }
+
+ .container {
+ .header {
+ padding: 20rpx 10rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+
+ .item {
+ display: flex;
+ flex-direction: row;
+ padding: 0 10rpx;
+ gap: 20rpx;
+ font-size: 30rpx;
+ // height: 1.5rem;
+ // justify-content: center;
+ align-items: center;
+
+ .left {
+ text-align: right;
+ width: 5rem;
+ }
+
+ .right {
+ flex: 1;
+ height: 100%;
+ padding: 6rpx 0;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+
+ >input {
+ height: auto;
+ }
+ }
+ }
+
+ .operation-zone {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-evenly;
+
+ .btn-c {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+ }
+
+ .divide {
+ width: 100%;
+ height: 16rpx;
+ background-color: #e5e5e5;
+ }
+
+ .content {
+ flex: 1;
+
+ .barcode-detail,
+ .barcode-split {
+ padding: 30rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 30rpx;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/tiaomaguanli/table.vue b/pages/tiaomaguanli/table.vue
new file mode 100644
index 0000000..c1cc9e9
--- /dev/null
+++ b/pages/tiaomaguanli/table.vue
@@ -0,0 +1,266 @@
+<template>
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title"><text>*</text>鏉$爜:</view>
+ <view class="right" style="width: 380rpx;">
+ <input :focus="HBarCodeFocus" v-model="HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜" @confirm="getCode(HBarCode)"/>
+ </view>
+ <uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HBillNo" disabled/>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">渚涘簲鍟�:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HSupName" disabled/>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HDeptName" disabled/>
+ </view>
+ </view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
+ <uni-card :title="item.鐗╂枡浠g爜" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
+ <view class="card-detail">
+ <view class="detail">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+ </view>
+ <view class="detail">
+ <text>璁㈠崟鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ </view>
+
+ </uni-card>
+ </view>
+
+ <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="listData.length != 0">宸插埌搴�</view>
+ </view>
+</template>
+
+<script>
+ import { CommonUtils } from "../../utils/common";
+import { getUserInfo } from "@/utils/auth.js";
+ export default {
+ data() {
+ return {
+ HBarCodeFocus: false,
+
+ userInfo:getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
+ HBarCode:'',
+ baseInfo:{
+ HBillNo:'',
+ HSupName:'',
+ HDeptName:'',
+ HInterID:'',
+ HBillType: 0,
+ },
+ sWhere:'',
+ listData:[],
+ }
+ },
+ onLoad(params) {
+ this.HBarCodeFocus = true
+ if(!CommonUtils.isEmpty(params.HBillType)) {
+ this.baseInfo.HBillType = params.HBillType
+ }
+ console.log(this.baseInfo.HBillType)
+ },
+ methods: {
+ async refreshBarCodeState() {
+ this.HBarCodeFocus = false
+ await this.$nextTick(() => {
+ this.HBarCodeFocus = true
+ this.HBarCode = ""
+ })
+ },
+ playSound(e){
+ const innerAudioContext = uni.createInnerAudioContext();
+ if(e == 1){
+ innerAudioContext.src = '/static/success.wav';
+ }else{
+ innerAudioContext.src = '/static/jingbao.wav';
+ }
+ innerAudioContext.play(); // 鎾斁闊抽
+ },
+ //鎵爜
+ toScanCode(){
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.HBarCode = ret.resp_result
+ this.getCode(this.HBarCode)
+ })
+ },
+ //鎵潯鐮佸鐞�
+ getCode(HBarCode){
+ if(!HBarCode){
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title:'鏉$爜涓嶈兘涓虹┖',
+ icon:'none'
+ })
+ }else{
+ let [HBarCodeBillNo] = HBarCode.split("@") //绗竴涓弬鏁拌〃绀哄崟鎹彿
+ let HBillType = this.baseInfo.HBillType
+ uni.request({
+ url: this.serverUrl + '/Web/GetBillInfo',
+ data: { HBillno: HBarCodeBillNo, HBillType: HBillType , HStockOrgID: uni.getStorageSync("OrganizationID") },
+ success: (res) => {
+ console.log('鎵爜杩斿洖',res.data.data);
+ this.HBarCode = ''
+ if(res.data.count == 1){
+ this.playSound(1)
+ var data = res.data.data
+ this.baseInfo = {
+ HBillNo:data[0].鍗曟嵁鍙�,
+ HSupName:data[0].渚涘簲鍟�,
+ HDeptName:data[0].閮ㄩ棬,
+ HInterID:data[0].hmainid,
+ HBillType: this.baseInfo.HBillType
+ }
+ this.listData = data
+ }else{
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ }
+ },
+ toSon(item){
+ uni.navigateTo({
+ url:'./table_son?OperationType=1&closeType=1&linterid=' + item.hmainid + '&hsubid=' + item.hsubid
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .form{
+ width: 640rpx;
+ margin: 20rpx auto;
+ }
+ .form-item{
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ padding: 6rpx 0;
+ .title{
+ width: 180rpx;
+ text{
+ color: red;
+ font-weight: bold;
+ }
+ }
+ .right{
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+ .righton{
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ input{
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+ }
+ .buttons{
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ margin-top: 20rpx;
+ button{
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+ .btn-a{
+ background-color: #acacac;
+ color: #fff;
+ }
+ .btn-b{
+ background-color: #41a863;
+ color: #fff;
+ }
+ .btn-c{
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+
+ .list{
+ width: 100%;
+ .card-detail{
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+ .detail{
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+ text{
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ .more{
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+ .part{
+ width: 50%;
+ text-align: center;
+ }
+ }
+ }
+
+</style>
diff --git a/pages/tiaomaguanli/table_son.vue b/pages/tiaomaguanli/table_son.vue
new file mode 100644
index 0000000..0ec9bf2
--- /dev/null
+++ b/pages/tiaomaguanli/table_son.vue
@@ -0,0 +1,1007 @@
+<template>
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鏀舵枡鍗曞彿:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HBillNo" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閲囪喘鍗曞彿:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HInnerBillNo" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡缂栫爜:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HMaterNumber" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡鍚嶇О:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HMaterName" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸鍨嬪彿:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HMaterModel" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏀舵枡鏁伴噺:</view>
+ <view class="righton">
+ <input v-model="baseInfo.HQty" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">姣忕鏁伴噺:</view>
+ <view class="righton">
+ <input disabled v-model="baseInfo.HMinQty" type="number" placeholder="璇疯緭鍏ユ暟閲�" @confirm="getNum()"
+ @blur="getNum()" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">绠辨暟:</view>
+ <view class="right">
+ <input v-model="baseInfo.HBQty" @blur="getHMinQtyByBQty()" />
+ </view>
+ </view>
+ <view class="buttons">
+ <button class="btn-b" size="mini" type="default" @tap="getList()">鏉$爜鐢熸垚</button>
+ <!-- <button class="btn-c" size="mini" type="default" @tap="searchLabelPrinter()">鎼滅储鎵撳嵃鏈�</button> -->
+ <!-- :disabled="codeGenComplete == false" -->
+ <button :class="codeGenComplete == false? 'btn-a': 'btn-c'" size="mini" type="default"
+ :disabled="codeGenComplete == false" @tap="search">鎵撳嵃</button>
+ </view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="list" v-for="(item,index) in listData" :key="index">
+ <uni-card :title="item.鐗╂枡浠g爜 || item.HMaterNumber" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
+ <view class="card-detail">
+ <view class="detail">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item.HMaterName || item['鐗╂枡鍚嶇О']}}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.HMaterModel|| item['瑙勬牸鍨嬪彿']}}
+ </view>
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.HQty || item['鏁伴噺']}}
+ </view>
+ <view class="detail" style="width: 100%;">
+ <text>鏉$爜缂栧彿锛�</text>{{item.HBarCodeNo}}
+ </view>
+ </view>
+ <!-- <view class="detail" style="text-align: right;" @tap.stop="labelPrint(item)"><text
+ style="color: orange;">鐐瑰嚮鎵撳嵃鏉$爜</text></view> -->
+ </uni-card>
+ </view>
+
+ <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="listData.length != 0">宸插埌搴�</view>
+
+ <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
+ </labelPrinterComponentVue>
+
+ <!-- 鎵撳嵃鏈洪�夋嫨鍒楄〃 -->
+ <view v-if="maskShow" class="uni-mask" @tap="maskShow = false">
+ <scroll-view class="uni-scroll_box" scroll-y>
+ <view class="uni-list-box" v-for="(device, index) in discoveredDevices" :key="index"
+ @tap="connectBT(device)">
+ <view class="uni-list_name">鍚嶇О锛歿{ device.name }}</view>
+ <view class="uni-list_item">{{ connectedDeviceId === device.address?'宸茶繛鎺�':'鏈繛鎺�' }}</view>
+ </view>
+ </scroll-view>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import labelPrinterComponentVue from "@/components/labelPrinterComponent/labelPrinterComponent.vue"
+ import {
+ CommonUtils
+ } from "../../utils/common";
+ // import bluetoothTool from '@/plugins/BluetoothTool.js'
+ // import permission from '@/plugins/permission.js'
+ // import {
+ // InputImage
+ // } from '@psdk/frame-imageb';
+ // import {
+ // ConnectedDevice,
+ // Lifecycle,
+ // Raw,
+ // FakeConnectedDevice,
+ // WriteOptions,
+ // } from '@psdk/frame-father';
+ // import {
+ // CBar,
+ // CBox,
+ // CForm,
+ // CImage,
+ // CLine,
+ // CCodeRotation,
+ // CCodeType,
+ // CPage,
+ // CText,
+ // CFont,
+ // CBold,
+ // CRotation,
+ // CInverse,
+ // CMag,
+ // CQRCode,
+ // CCorrectLevel,
+ // CSN,
+ // CStatus,
+ // } from "@psdk/cpcl";
+ // import {
+ // EImage
+ // } from "@psdk/esc";
+ export default {
+ components: {
+ labelPrinterComponentVue
+ },
+ data() {
+ return {
+ codeGenComplete: false,
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ OperationType: 1, //鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫
+ linterid: '',
+ HEntryID: '',
+ baseInfo: {
+ HMainID: '',
+ HSubID: '',
+ HBillNo: '',
+ HBillType: '',
+ HMaterID: '',
+ HMaterNumber: '',
+ HMaterName: '',
+ HMaterModel: '',
+ HQty: '',
+ HMinQty: '',
+ HSupID: '',
+ SHdate: '',
+ HMTONo: '',
+ HBatchNo: '',
+ HBQty: '',
+ HSupID: '',
+ HSupNumber: '',
+ HSupName: '',
+ HUnitID: '',
+ HPcsName: '',
+ HSupNameShort: '',
+ HMTONo: '',
+ HDate: '',
+ HSourceBillNo: '',
+ HMaker: getUserInfo()["Czymc"],
+ HCoilNO: '',
+ HFurnaceNO: '',
+ HFactory: '',
+ HSupMaterNumber: '',
+ HInterID: '',
+ },
+ sWhere: '',
+ listData: [],
+ printItem: '',
+
+ printInfo: "",
+ maskShow: false,
+ discoveredDevices: [], // 鏌ヨ鍒扮殑璁惧
+ connectedDeviceId: ""
+ }
+ },
+ onLoad(e) {
+ this.OperationType = e.OperationType
+ this.linterid = e.linterid
+ this.HEntryID = e.hsubid
+ this.getData()
+
+ // //#ifdef APP-PLUS
+ // // 钃濈墮
+ // bluetoothTool.init({
+ // listenBTStatusCallback: (state) => {
+ // if (state == 'STATE_ON') {
+ // console.log(state);
+ // }
+ // },
+ // discoveryDeviceCallback: this.onDevice,
+ // discoveryFinishedCallback: function() {
+ // console.log("鎼滅储瀹屾垚");
+ // },
+ // readDataCallback: function(dataByteArr) {
+ // /* if(that.receiveDataArr.length >= 200) {
+ // that.receiveDataArr = [];
+ // }
+ // that.receiveDataArr.push.apply(that.receiveDataArr, dataByteArr); */
+ // console.log("璇诲彇瀹屾垚" + dataByteArr);
+ // },
+ // connExceptionCallback: function(e) {
+ // console.log(e);
+ // }
+ // });
+ // //#endif
+ },
+ methods: {
+ getData() {
+ uni.request({
+ url: this.serverUrl + '/Cg_POInStockBill/loadCg_POInStockBill_Push',
+ data: {
+ HInterID: this.linterid,
+ HSubID: this.HEntryID
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ var data = res.data.data
+ this.baseInfo = Object.assign(this.baseInfo, {
+ HMainID: data[0].hmainid,
+ HSubID: data[0].hsubid,
+ HBillNo: data[0].鍗曟嵁鍙�,
+ HBillType: data[0]['HBillType'],
+ HSourceBillNo: data[0].鍗曟嵁鍙�,
+ HInnerBillNo: data[0].閲囪喘璁㈠崟鍙�,
+ HMaterID: data[0].HMaterID,
+ HMaterNumber: data[0].鐗╂枡浠g爜,
+ HMaterName: data[0].鐗╂枡鍚嶇О,
+ HMaterModel: data[0].瑙勬牸鍨嬪彿,
+ HQty: data[0].鏁伴噺,
+ HMinQty: data[0].鏁伴噺,
+ HSupID: data[0].HSupID,
+ SHdate: data[0].瀹℃牳鏃ユ湡,
+ HBatchNo: data[0]['鎵瑰彿'],
+ HSupID: data[0]['HSupID'],
+ HSupNumber: data[0]['渚涘簲鍟嗕唬鐮�'],
+ HSupName: data[0]['渚涘簲鍟�'],
+ HSupMaterNumber: data[0]['渚涘簲鍟嗙墿鏂欑紪鐮�'],
+ HUnitID: data[0]['HUnitID'],
+ HPcsName: data[0]['璁¢噺鍗曚綅'],
+ HSupNameShort: data[0]['渚涘簲鍟嗙畝绉�'],
+ HMTONo: data[0]['璁″垝璺熻釜鍙�'].trim(),
+ HDate: data[0]['鏃ユ湡'],
+ HCoilNO: data[0]['娆惧彿'],
+ HFurnaceNO: data[0]['鍒嗙粍'],
+ HFactory: data[0]['瀹㈡埛缂栧彿'],
+ })
+
+ this.baseInfo.HBQty = Math.ceil(this.baseInfo.HQty / this.baseInfo.HMinQty)
+
+ this.listData = data
+
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ getNum(e) {
+ if (this.baseInfo.HMinQty && this.baseInfo.HMinQty > 0) {
+ var a = Number(this.baseInfo.HQty) / Number(this.baseInfo.HMinQty)
+ this.baseInfo.HBQty = Math.ceil(Number(this.baseInfo.HQty) / Number(this.baseInfo.HMinQty))
+ this.$forceUpdate()
+ } else {
+ uni.showToast({
+ title: '璇疯緭鍏ュぇ浜�0鐨勫悎鐞嗘暟閲�',
+ icon: "none"
+ })
+ }
+ },
+ getHMinQtyByBQty() {
+ if (this.baseInfo.HBQty && this.baseInfo.HBQty > 0) {
+ let minQty = Math.ceil(this.baseInfo.HQty / this.baseInfo.HBQty)
+
+
+ this.baseInfo.HMinQty = minQty
+ this.$forceUpdate()
+ } else {
+ uni.showToast({
+ title: '璇疯緭鍏ュぇ浜�0鐨勫悎鐞嗘暟閲�',
+ icon: "none"
+ })
+ }
+ },
+ async getList() {
+ let HBarCodeNoStrs = []
+ var sMain = []
+ // sMain = this.baseInfo
+ // var sMainStr = JSON.stringify(sMain);
+ //鑾峰彇閫夋嫨鐨勭粍缁�
+ var HOrgType = uni.getStorageSync('Organization');
+ //鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
+ var CampanyName = "xxx";
+ //鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
+ var HSourceBillType = "鏀舵枡閫氱煡鍗�";
+ //鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
+ var HSelectBarCodeType = "鍞竴鏉$爜";
+
+ if(uni.getStorageSync('Organization').includes('娴疯瘹')){
+ HSelectBarCodeType = "鍝佺鏉$爜";
+ }
+ //鑾峰彇褰撳墠鐧诲綍浜哄憳
+ var UserName = uni.getStorageSync('HUserName');
+ let listDataTemp = []
+ let i = 0
+ let barCodeTemplate = await this.getBarCodeTemplate()
+ for (let receiveQty = this.baseInfo.HQty; receiveQty > 0; receiveQty -= this.baseInfo.HMinQty) {
+ i++
+ let baseInfoClone = JSON.parse(JSON.stringify(this.baseInfo))
+ let barCodeNo = ''
+ if (receiveQty - this.baseInfo.HMinQty >= 0) {
+ listDataTemp.push(Object.assign(baseInfoClone, {
+ HQty: this.baseInfo.HMinQty,
+ HInterID: receiveQty + 1,
+ HBatchNo: this.baseInfo.HBatchNo,
+ HMTONo: this.baseInfo.HMTONo,
+ }))
+ } else {
+ listDataTemp.push(Object.assign(baseInfoClone, {
+ HQty: receiveQty % this.baseInfo.HMinQty,
+ HInterID: receiveQty + 1,
+ HBatchNo: '',
+ HMTONo: '',
+ }))
+ }
+
+ barCodeNo = CommonUtils.replaceWithFunction(barCodeTemplate.Format, (key) => {
+ // 鑷畾涔夊鐞嗛�昏緫
+ let date = new Date()
+ if (key === 'FlowNumber'){
+ // 娴佹按鍙� 璁剧疆涓嶅悓鐨勬祦姘村彿鐢熸垚閫昏緫 TODO 閫氳繃鍚庣鑾峰彇娴佹按鍙�
+ return `${date.getFullYear().toString()}${(date.getMonth() + 1).toString()}${date.getDate().toString()}${i.toString().padStart(3, '0')}`
+ }
+ else {
+ return baseInfoClone[key]
+ }
+
+ });
+
+ listDataTemp[listDataTemp.length - 1]['HBarCodeNo'] = barCodeNo
+ HBarCodeNoStrs.push(
+ barCodeNo
+ )
+
+ }
+ console.log('listDataTemp: ',listDataTemp);
+ this.listData = listDataTemp
+ console.log(listDataTemp)
+ HBarCodeNoStrs = JSON.stringify(HBarCodeNoStrs)
+ sMain = listDataTemp
+ let sMainStr = JSON.stringify(listDataTemp)
+ let sMainSub = `${sMainStr};${HOrgType};${HSourceBillType};${HSelectBarCodeType};${CampanyName};${UserName};${HBarCodeNoStrs};${this.baseInfo.HFactory || ''};${this
+ .baseInfo.HCoilNO || ''}; ${this.baseInfo.HFurnaceNO || ''}`
+ console.log('sMainSub: ',sMainSub);
+ uni.showLoading()
+ uni.request({
+ url: this.serverUrl + '/Sc_BarCode/SaveBarCode_NoGenerate_Batch',
+ method: 'POST',
+ data: {
+ msg: sMainSub,
+ CampanyName: CampanyName
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ if(res.data.code == 2) {
+ // 鏁版嵁宸插瓨鍦ㄧ殑鎯呭喌
+ this.listData = Array.from(res.data.data).map(item => {
+ let baseInfoClone = JSON.parse(JSON.stringify(this.baseInfo))
+ return Object.assign(baseInfoClone, {
+ HQty: item['HQty'],
+ HBarCodeNo: item['HBarCode'],
+ HInterID: item['HInterID']
+ })
+ })
+
+ this.baseInfo.HBQty = res.data.data.length
+ this.baseInfo.HMinQty = Math.ceil(this.baseInfo.HQty / res.data.data.length)
+ this.codeGenComplete = true
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }else {
+ this.codeGenComplete = true
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ complete() {
+ uni.hideLoading()
+ }
+ });
+ },
+ async getBarCodeTemplate() {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/Sc_BarCode/Get_BarCodeGenTemplate",
+ data: {
+ HOrginationName: uni.getStorageSync("Organization"),
+ HBillSubType: '1103'
+ },
+ resFunction: (res) => {
+ let {data, count, Message} = res.data
+ if(count == 1) {
+ resolve(JSON.parse(data))
+ }else {
+ uni.showToast({
+ icon: 'none',
+ title:Message
+ })
+ reject()
+ }
+ },
+ errFunction: () => {
+ reject()
+ }
+ })
+ })
+ },
+ async checkPermission() { // 鎺堟潈
+ try {
+ let checkResult = await permission.androidPermissionCheck("bluetooth");
+ console.log("妫�娴嬩俊鎭細", checkResult);
+ if (checkResult.code == 1) {
+ let result = checkResult.data;
+ if (result == 1) {
+ console.log("鎺堟潈鎴愬姛!");
+ }
+ if (result == 0) {
+ console.log("鎺堟潈宸叉嫆缁�!");
+ }
+ if (result == -1) {
+ console.log("鎮ㄥ凡姘镐箙鎷掔粷鏉冮檺锛岃鍦ㄥ簲鐢ㄨ缃腑鎵嬪姩鎵撳紑!");
+ }
+ }
+ } catch (err) {
+ console.log("鎺堟潈澶辫触锛�", err);
+ }
+ },
+ async search() {
+ // #ifndef APP-PLUS
+ uni.showModal({
+ content: "涓嶆敮鎸佽摑鐗欐墦鍗板姛鑳斤紝璇峰垏鎹㈢Щ鍔ㄨ澶�...",
+ })
+ return
+ // #endif
+ if (this.$printer.isConnected() === false) {
+ this.$refs.labelPrinter.openPopup()
+ } else {
+ let printContent = []
+ let printInfoBuffer = []
+ let count = 0
+ uni.showLoading()
+ console.log('this.listData: ',this.listData);
+ for (let listOne of this.listData) {
+ // let pcsInfo = this.baseInfo.HPcsName ? '(' + this.baseInfo.HPcsName + ')' : ''
+ // let HFurnaceNO = this.baseInfo.HFurnaceNO.split('.')
+ // printContent.push(`! 0 200 200 400 1
+ // PAGE-WIDTH 608
+ // SETQRVER 3
+ // B QR 475 15 Q 0 U 3
+ // LA,${listOne.HBarCodeNo}
+ // ENDQR
+ // T 24 0 0 30 渚涘簲鍟�: ${listOne.HSupNameShort}
+ // T 55 0 0 55 (Supplier)
+ // T 24 0 200 30 瀹㈡埛缂栧彿: ${listOne.HFactory || ''}
+ // T 55 0 200 55 (Consumer No.)
+ // T 24 0 0 75 鐗╂枡缂栫爜: ${listOne.HMaterNumber}
+ // T 55 0 0 100 (Material Number)
+ // T 24 0 0 120 鐗╂枡鍚嶇О: ${listOne.HMaterName}
+ // T 55 0 0 145 (Material Code)
+ // T 24 0 0 165 娆惧彿: ${listOne.HCoilNO || ''}
+ // T 55 0 0 190 (Style No.)
+ // T 24 0 300 165 渚涘簲鍟嗘枡鍙�: ${listOne.HSupMaterNumber}
+ // T 55 0 300 190 (Supplier Sku No.)
+ // T 24 0 0 210 鍒嗙粍: ${HFurnaceNO[1] || HFurnaceNO[0] || ''}
+ // T 55 0 0 235 (Group)
+ // T 24 0 300 210 瑙勬牸: ${listOne.HMaterModel}
+ // T 55 0 300 235 (SKU NO.)
+ // T 24 0 0 255 鏁伴噺: ${ parseFloat(listOne.HQty || 0).toFixed(0) } ${pcsInfo}
+ // T 55 0 0 280 (Quantity)
+ // T 24 0 300 255 鏃ユ湡: ${listOne.HDate || ''}
+ // T 55 0 300 280 (Date)
+ // T 24 0 0 300 妫�楠屽憳:
+ // L 80 325 250 325 3
+ // T 55 0 0 325 (QC)
+ // T 24 0 300 300 閲囪喘鍗曞彿: ${listOne.HInnerBillNo || ''}
+ // T 55 0 300 325 (Purchase Order No.)
+ // T 24 0 0 345 妫�楠岀粨鏋�:
+ // T 55 0 0 370 (Inspection status)
+ // BOX 240 345 260 365 4
+ // T 24 0 270 345 鍚堟牸
+ // T 55 0 250 370 (Pass)
+ // BOX 340 345 360 365 4
+ // T 24 0 370 345 涓嶅悎鏍�
+ // T 55 0 370 370 (Fail)
+ // BOX 460 345 480 365 4
+ // T 24 0 490 345 鐗归噰
+ // T 55 0 440 370 (Spec. accepted)
+ // FORM
+ // PRINT`)
+ let Message = await this.getPrintTemplate(listOne.HInterID)
+ printContent.push(Message)
+ count++;
+ if (count == 10) {
+ printInfoBuffer.push(printContent.join("\r\n"))
+ count = 0
+ printContent = []
+ }
+ }
+ uni.hideLoading()
+ printInfoBuffer.push(printContent.join("\r\n"))
+ this.printInfo = JSON.stringify(printInfoBuffer)
+ printInfoBuffer = []
+
+ await this.$nextTick(() => {
+ this.$refs.labelPrinter.execPrint()
+ })
+ }
+ },
+ async getPrintTemplate(HInterID) {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/Sc_BarCode/Get_BarCodePrintCode_CPCL",
+ data: {
+ HOrginationName: uni.getStorageSync("Organization"),
+ HBillInterID: this.linterid,
+ HBillEntryID: this.HEntryID,
+ HViewName: 'h_v_IF_POInStockBillList',
+ HBillSubType: '1103',
+ HInterID: HInterID
+ },
+ resFunction: (res) => {
+ let {
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ resolve(Message)
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ reject();
+ }
+ },
+ errFunction: (err) => {
+ reject();
+ },
+
+ })
+ })
+ },
+ async searchLabelPrinter() {
+ // 鏌ユ壘鎵撳嵃鏈�
+ var that = this
+ // 浣跨敤openBluetoothAdapter 鎺ュ彛锛屽厤鍘讳富鍔ㄧ敵璇锋潈闄愮殑楹荤儲
+ uni.openBluetoothAdapter({
+ success: async (res) => {
+ await this.checkPermission();
+ console.log('start discovery devices');
+ this.discoveredDevices = [];
+ console.log(res)
+ bluetoothTool.discoveryNewDevice();
+ this.maskShow = true
+ },
+ fail: async (e) => {
+ console.error(e)
+ switch (e.code) {
+ case "10009":
+ this.showToast("姝よ澶囦笉鏀寔璁惧鎼滅储鍔熻兘!");
+ break;
+ default:
+ console.error(e);
+ }
+ }
+ })
+
+ },
+ onDevice(device) {
+ console.log("鐩戝惉瀵绘壘鍒版柊璁惧鐨勪簨浠�---------------")
+ console.log(device)
+ if (typeof device === 'undefined') return;
+ if (typeof device.name === 'undefined') return;
+ console.log(device.name);
+ if (device.name === '') return;
+ if (device.name === null) return;
+ if (device.name.toUpperCase().endsWith('_BLE') ||
+ device.name.toUpperCase().endsWith('-LE') ||
+ device.name.toUpperCase().endsWith('-BLE')) return;
+ const isDuplicate = this.discoveredDevices.find(item => item.address === device.address);
+ if (isDuplicate) return;
+ this.discoveredDevices.push(device);
+ },
+ connectBT(device) {
+ const vm = this;
+ uni.showLoading({
+ title: '杩炴帴涓�'
+ });
+ bluetoothTool.connDevice(device.address, (result) => {
+ console.log(result)
+ uni.hideLoading()
+ if (result) {
+ // // console.log(result);
+ bluetoothTool.cancelDiscovery();
+ // console.log(vm.$printer)
+ vm.$printer.init(new FakeConnectedDevice());
+ vm.connectedDeviceId = device.address;
+ uni.showToast({
+ icon: 'none',
+ title: '杩炴帴鎴愬姛'
+ })
+ this.maskShow = false
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: '杩炴帴澶辫触'
+ })
+ }
+ });
+ },
+ stopSearchBT() {
+ console.log("鍋滄鎼滃闄勮繎鐨勮摑鐗欏鍥磋澶�---------------")
+ bluetoothTool.cancelDiscovery();
+ },
+ closeBluetooth() {
+ console.log("鍋滄钃濈墮杩炴帴")
+ const vm = this;
+ if (vm.connectedDeviceId != '') {
+ bluetoothTool.closeBtSocket();
+ vm.connectedDeviceId = "";
+ }
+ },
+ async labelPrint(item) {
+ // 鎵撳嵃
+ this.printItem = item
+ if (this.$printer.isConnected() === false) {
+ this.$refs.labelPrinter.openPopup()
+ } else {
+ this.printInfo = `! 0 200 200 300 1
+ PAGE-WIDTH 608
+ SETQRVER 3
+ B QR 450 30 M 2 U 5
+ LA,` + this.printItem.鏉$爜缂栧彿 + `
+ ENDQR
+ T 24 0 24 40 瀹℃牳鏃ユ湡:` + this.baseInfo.SHdate + `
+ T 24 0 24 80 鐗╂枡缂栫爜:` + this.printItem.鐗╂枡浠g爜 + `
+ T 24 0 24 120 鐗╂枡鍚嶇О:` + this.printItem.鐗╂枡鍚嶇О + `
+ T 24 0 24 160 瑙勬牸鍨嬪彿:` + this.printItem.瑙勬牸鍨嬪彿 + `
+ T 24 0 24 200 鐗╂枡鏁伴噺:` + this.baseInfo.HQty + `
+ T 24 0 24 240 鏉$爜鏁伴噺:` + this.printItem.鏁伴噺 + `
+ FORM
+ PRINT`
+ await this.$nextTick(() => {
+ this.$refs.labelPrinter.execPrint()
+ })
+ }
+
+ // // 妫�鏌ヨ摑鐗欒繛鎺�
+ // let btStatus = bluetoothTool.getBluetoothStatus()
+ // if(btStatus != true) {
+ // this.showToast("钃濈墮杩炴帴寮傚父!")
+ // return
+ // }
+
+ // // 妫�鏌ユ槸鍚﹁繛鎺ヨ澶�
+ // let pairedDevices = bluetoothTool.getPairedDevices()
+ // if(pairedDevices.length < 1) {
+ // this.showToast("鏃犺澶囪繛鎺�!")
+ // return
+ // }
+
+ // // 妫�鏌ヨ〃鍗曢」鏄惁鏈夌┖鍊�
+ // for (var key in this.hform) {
+ // if (this.hform[key] == "") {
+ // // todo 鎻愮ず琛ㄥ崟椤逛笉鑳戒负绌�
+ // this.showToast("琛ㄥ崟涓嶈兘鏈夌┖鍊�!")
+ // return
+ // }
+ // }
+ // this.printWrite()
+ },
+ // showToast(msg, status = "none") {
+ // uni.showToast({
+ // title: msg,
+ // icon: status,
+ // duration: 2000
+ // });
+ // },
+ // ///杞垚瀹夊崜鏈夌鍙风殑
+ // uint8ArrayToSignedArray(uint8Array) {
+ // let signedArray = new Array(uint8Array.length);
+ // for (let i = 0; i < uint8Array.length; i++) {
+ // if (uint8Array[i] >= 128) {
+ // signedArray[i] = uint8Array[i] - 256;
+ // } else {
+ // signedArray[i] = uint8Array[i];
+ // }
+ // }
+ // return signedArray;
+ // },
+ // async printWrite(type = "cpcl") {
+ // const vm = this;
+ // console.log("寮�濮嬫墦鍗�------------------")
+ // switch (type) {
+ // case "cpcl":
+ // await vm.writeCpclModel();
+ // break;
+ // }
+ // },
+ // async writeCpclModel() {
+ // const vm = this;
+ // try {
+ // const cpcl = await vm.$printer.cpcl().clear()
+ // .page(new CPage({
+ // width: 608,
+ // height: 300
+ // }))
+ // .qrcode(new CQRCode({
+ // x: 450,
+ // y: 30,
+ // width: 5,
+ // content: vm.printItem.鏉$爜缂栧彿,
+ // codeRotation: CCodeRotation.ROTATION_0,
+ // level: CCorrectLevel.L
+ // }))
+ // .text(new CText({
+ // x: 24,
+ // y: 40,
+ // content: vm.baseInfo.SHdate?"瀹℃牳鏃ユ湡: " + vm.baseInfo.SHdate : "瀹℃牳鏃ユ湡: ",
+ // font: CFont.TSS24
+ // }))
+ // .text(new CText({
+ // x: 24,
+ // y: 80,
+ // content: "鐗╂枡缂栫爜: " + vm.printItem.鐗╂枡浠g爜,
+ // font: CFont.TSS24
+ // }))
+ // .text(new CText({
+ // x: 24,
+ // y: 120,
+ // content: "鐗╂枡鍚嶇О: " + vm.printItem.鐗╂枡鍚嶇О,
+ // font: CFont.TSS24
+ // }))
+ // .text(new CText({
+ // x: 24,
+ // y: 160,
+ // content: "瑙勬牸鍨嬪彿: " + vm.printItem.瑙勬牸鍨嬪彿,
+ // font: CFont.TSS24
+ // }))
+ // .text(new CText({
+ // x: 24,
+ // y: 200,
+ // content: "鐗╂枡鏁伴噺: " + vm.baseInfo.HQty,
+ // font: CFont.TSS24
+ // }))
+ // .text(new CText({
+ // x: 24,
+ // y: 240,
+ // content: "鏉$爜鏁伴噺: " + vm.printItem.鏁伴噺,
+ // font: CFont.TSS24
+ // }))
+
+ // .form(new CForm()) //鏍囩绾搁渶瑕佸姞瀹氫綅鎸囦护
+ // .print();
+ // console.log(cpcl.command().string());
+ // var binary = cpcl.command().binary();
+ // await this.sendMessage(Array.from(this.uint8ArrayToSignedArray(binary)));
+ // } catch (e) {
+ // console.error(e);
+ // uni.showToast({
+ // title: '澶辫触',
+ // });
+ // }
+ // },
+ // async sendMessage(cmd) {
+ // console.log(cmd);
+ // const result = bluetoothTool.sendByteData(cmd);
+ // uni.showToast({
+ // icon: 'none',
+ // title: result ? '鍙戦�佹垚鍔燂紒' : '鍙戦�佸け璐�...'
+ // })
+ // },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .form {
+ width: 640rpx;
+ margin: 20rpx auto;
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ padding: 6rpx 0;
+
+ .title {
+ width: 180rpx;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+
+ .right {
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .righton {
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ input {
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+ }
+
+ .buttons {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ margin-top: 20rpx;
+
+ button {
+ border-radius: 50rpx;
+ width: 220rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #acacac;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+
+ .list {
+ width: 100%;
+
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+ word-break: break-all;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+
+ }
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+ }
+
+ .uni-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ z-index: 9999;
+ display: flex;
+ align-items: center;
+ width: 100%;
+ background: rgba(0, 0, 0, 0.6);
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ }
+
+ .uni-scroll_box {
+ height: 60%;
+ background: #fff;
+ border-radius: 20rpx;
+ }
+
+ .uni-list-box {
+ margin: 0 20rpx;
+ padding: 15rpx 0;
+ border-bottom: 1px #f5f5f5 solid;
+ box-sizing: border-box;
+ }
+
+ .uni-list:last-child {
+ border: none;
+ }
+
+ .uni-list_name {
+ font-size: 30rpx;
+ color: #333;
+ }
+
+ .uni-list_item {
+ font-size: 24rpx;
+ color: #555;
+ line-height: 1.5;
+ }
+
+ .operation-zone {
+ display: flex;
+ justify-content: space-around;
+ margin-top: 10rpx;
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ }
+</style>
\ No newline at end of file
diff --git a/pages/weiwailingliao/form.vue b/pages/weiwailingliao/form.vue
index 53006f9..34bf21d 100644
--- a/pages/weiwailingliao/form.vue
+++ b/pages/weiwailingliao/form.vue
@@ -1064,7 +1064,7 @@
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
this.hform.HMainSourceBillType = data.hSourceBillTypeField
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1089,10 +1089,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
@@ -1262,7 +1294,7 @@
this.hform.HMainSourceBillType = data.HSourceBillType
this.hform.HSourceBillNo = data.HSourceBillNo
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data.HSourceBillType)
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
this.hform.HMainSourceBillType = data.HSourceBillType
diff --git a/pages/weiwairuku/form.vue b/pages/weiwairuku/form.vue
new file mode 100644
index 0000000..94bf27f
--- /dev/null
+++ b/pages/weiwairuku/form.vue
@@ -0,0 +1,1650 @@
+<template>
+ <view>
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="right" style="width: 380rpx;">
+ <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+ @confirm="getCode(hform.HBarCode)" />
+ </view>
+ <view class="icon-wrapper" @click="toScanCode">
+ <uni-icons type="scan" size="20"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="right">
+ <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHWHName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撳簱" v-model="hform.HWHName"
+ @input="HWHNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撲綅:</view>
+ <view class="right" v-show="showHStockPlaceName">
+ <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
+ v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHStockPlaceName">
+ <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="涓嶅彲鎿嶄綔" />
+ </view>
+ </view>
+
+ <view class="tabs">
+ <view :class="tabs == 0 ? 'on' : ''" @tap="tabs = 0">閫夋嫨婧愬崟</view>
+ <view :class="tabs == 1 ? 'on' : ''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
+ <view :class="tabs == 2 ? 'on' : ''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
+ <view :class="tabs == 3 ? 'on' : ''" @tap="tabs = 3">鏉$爜淇℃伅</view>
+ <view :class="tabs == 4 ? 'on' : ''" @tap="tabs = 4">涓嬫灦淇℃伅</view>
+ </view>
+
+ <view v-if="tabs == 0">
+ <view class="form-item">
+ <view class="title">婧愬崟绫诲瀷:</view>
+ <view class="right" v-show="showHMainSourceBillType">
+ <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
+ @change="HMainSourceBillTypeChange">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ <view class="righton" v-show="!showHMainSourceBillType">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">婧愬崟鍗曞彿:</view>
+ <view class="right" v-show="showHSourceBillNo">
+ <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
+ v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
+ <input :focus="HSourceBillNoFocus" @confirm="getHBarCodeData(hform.HSourceBillNo)" type="text"
+ name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+
+ </view>
+ <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
+ <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+ </view>
+
+ <view class="righton" v-show="!showHSourceBillNo">
+ <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍏堣繘鍏堝嚭浠�:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHWHName" placeholder="璇烽�夋嫨" v-model="hform.HFIFOWHName"
+ @input="HFIFOWHNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏃ユ湡:</view>
+ <view class="right">
+ <picker mode="date" v-model="hform.HDate" @change="HDateChange">
+ <input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍒跺崟浜�:</view>
+ <view class="righton">
+ <input name="HMaker" disabled v-model="hform.HMaker" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input name="HBillNo" disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁ID:</view>
+ <view class="righton">
+ <input name="HInterID" disabled v-model="hform.HInterID" />
+ </view>
+ </view>
+ </view>
+
+ <view v-if="tabs == 1">
+ <view class="form-item">
+ <view class="title">淇濈:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨淇濈鍛�" v-model="hform.HKeeperName"
+ @input="HKeeperNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">楠屾敹:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨楠屾敹鍛�" v-model="hform.HSecManagerName"
+ @input="HSecManagerNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" v-model="hform.HDeptName"
+ @input="HDeptNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">渚涘簲鍟�:</view>
+ <!-- <view class="right" v-show="showHSupName">
+ <uni-combox :candidates="arrayHSupName" placeholder="璇烽�夋嫨渚涘簲鍟�" v-model="hform.HSupName"
+ @input="HSupNameChange"></uni-combox>
+ </view> -->
+ <view class="righton">
+ <input name="HSupName" disabled v-model="hform.HSupName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁勭粐:</view>
+ <view class="righton">
+ <input name="HStockOrgName" disabled v-model="hform.HStockOrgName" />
+ </view>
+ </view>
+ </view>
+
+ <view v-if="tabs == 2">
+ <view class="list" v-for="(item, index) in Materlist" :key="index">
+ <uni-card :title="item.鐗╂枡鍚嶇О" :extra="item.鐗╂枡浠g爜" style="margin: 10px;" @tap="delMater(item)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>婧愬崟鍗曞彿锛�</text>{{ item.婧愬崟鍗曞彿 }}
+ </view>
+ <view class="detail">
+ <text>婧愬崟鏁伴噺锛�</text>{{ item.婧愬崟鏁伴噺 }}
+ </view>
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{ item.鏁伴噺 }}
+ </view>
+ <view class="detail">
+ <text>鏉$爜涓暟锛�</text>{{ item.鏉$爜涓暟 }}
+ </view>
+ <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{ item.瑙勬牸鍨嬪彿 }}
+ </view>
+ <view class="detail" v-if="item.杈呭姪灞炴��">
+ <text>杈呭姪灞炴�э細</text>{{ item.杈呭姪灞炴�� }}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
+
+ <view v-if="tabs == 4">
+ <view class="list" v-for="(item, index) in FIFOlist" :key="index">
+ <uni-card :title="item.HMaterName" :extra="item.HMaterNumber" style="margin: 10px;"
+ @tap="delMater(item)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{ item.HQty }}
+ </view>
+ <view class="detail">
+ <text>涓嬫灦鏁伴噺锛�</text>{{ item.HQtyMust }}
+ </view>
+ <view class="detail">
+ <text>浠撳簱锛�</text>{{ item.HWhName }}
+ </view>
+ <view class="detail">
+ <text>浠撲綅锛�</text>{{ item.HSPName }}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{ item.HMaterModel }}
+ </view>
+ <view class="detail" v-if="item.HBatchNo">
+ <text>鎵瑰彿锛�</text>{{ item.HBatchNo }}
+ </view>
+ <view class="detail" v-if="item.HAuxPropName">
+ <text>杈呭姪灞炴�э細</text>{{ item.HAuxPropName }}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="FIFOlist.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
+
+ <view v-if="tabs == 3">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="righton">
+ <input name="HBarCode_B" disabled v-model="hform.HBarCode_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HMaterName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HMaterModel_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鎵规:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBatchNo_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曚綅:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HUnitName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HQty_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹归噺:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HTMQty_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HWHName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撲綅:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HSPName_B" />
+ </view>
+ </view>
+ </view>
+
+ <view class="bottom-btn">
+ <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <view style="flex: 1;">
+ </view>
+
+ <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+ </view>
+ <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
+ :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
+ </view>
+</template>
+<script>
+ import getDateTime from '@/utils/getdateTime.js';
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue';
+ import { getUserStockRelation } from '../../utils/userRelationManager';
+import { CommonUtils } from '../../utils/common';
+ export default {
+ data() {
+ return {
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ HModName: 'Kf_EntrustInBillList_PDA',
+ ModRightName: 'CE_EntrustIn',
+ OperationType: 1,
+ HInterID_Temp: '',
+
+ showHStockPlaceName: false,
+ showHMainSourceBillType: true,
+ showHSourceBillNo: true,
+ reHSourceBillNo: true,
+ showHSupName: true,
+ barCodeFocus: false,
+ HSourceBillNoFocus: false,
+
+ tabs: 0,
+ HMainSourceBillType: '鏀舵枡閫氱煡鍗�',
+ arrayHMainSourceBillType: ['鏀舵枡閫氱煡鍗�','濮斿璁㈠崟', '鎵嬪伐褰曞叆'],
+ arrayHMainSourceBillValue: [1103, 1601, -1],
+
+ linterid: '',
+ HBillNo: '',
+ btnType: 0, //0鏂板锛�1淇敼锛�2瀹℃牳锛�3鍙嶅鏍�
+ showmore: false,
+
+ arrayHWHName: [], //浠撳簱
+ HWHNameList: [],
+ arrayHStockPlaceName: [], //浠撲綅
+ HStockPlaceNameList: [],
+ arrayHSourceBillNo: [], //婧愬崟鍗曞彿
+ HSourceBillNoList: [],
+
+ arrayHEmpName: [], //鎿嶄綔鍛�
+ HEmpNameList: [],
+ arrayHDeptName: [], //閮ㄩ棬
+ HDeptNameList: [],
+ arrayHSupName: [], //瀹㈡埛
+ HSupNameList: [],
+
+ Materlist: [],
+ FIFOlist: [],
+ hform: {
+ HBillType: 1210,
+ HBillerID: uni.getStorageSync('HBillerID'),
+ HRedBlueFlag: false,
+
+ HBarCode: '',
+ HQty: '',
+ HWHName: getUserInfo().HWHName,
+ HWHID: getUserInfo().HWhID,
+ HStockPlaceName: getUserInfo().HSPName,
+ HStockPlaceID: getUserInfo().HSPID,
+
+ HMainSourceBillType: 1103,
+ HSourceBillNo: '', //CGDD000200
+ HFIFOWHName: '',
+ HFIFOWHID: '',
+ HDate: getDateTime.dateTimeStr('y-m-d'),
+ HMaker: uni.getStorageSync('HUserName'),
+ HBillNo: '',
+ HInterID: '',
+
+ HKeeperName: getUserInfo().HKeeper,
+ HKeeperID: getUserInfo().HKeeperID,
+ HSecManagerName: getUserInfo().HSecManager,
+ HSecManagerID: getUserInfo().HSecManagerID,
+ HDeptName: getUserInfo().HDept,
+ HDeptID: getUserInfo().HDeptID,
+ HSupName: '',
+ HSupID: '',
+ HStockOrgName: uni.getStorageSync('Organization'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+
+ HBarCode_B: '',
+ HMaterName_B: '',
+ HMaterModel_B: '',
+ HBatchNo_B: '',
+ HUnitName_B: '',
+ HQty_B: '',
+ HTMQty_B: '',
+ HWHName_B: '',
+ HSPName_B: '',
+ }
+ }
+ },
+ components: {
+ BillListPopupVue
+ },
+ onLoad(e) {
+ console.log(e, this.userInfo)
+ this.OperationType = e.OperationType
+ if (e.HInterID) {
+ this.HInterID_Temp = e.HInterID
+ // this.btnType = 1
+ this.RoadBillMain(e.HInterID)
+ this.barCodeFocus = true
+ } else {
+ this.getNewData()
+ this.HSourceBillNoFocus = true;
+ }
+ // this.getHBaseList()
+ this.getHSupList()
+ this.getHEmpList()
+ this.getHDeptList()
+
+ this.getRelationStore()
+
+ uni.$on('BillSelectComplete', (e) => {
+ console.log("鎺ユ敹鍒扮殑娑堟伅: ", e.HBillNo)
+ this.getHBarCodeData(e.HBillNo)
+ this.$refs.billList.exit()
+ })
+ },
+ onUnload() {
+ uni.$off('BillSelectComplete')
+ },
+ methods: {
+ async getRelationStore() {
+ let {
+ data,
+ count
+ } = await getUserStockRelation()
+ if (count == 1) {
+ let WHIDList = []
+
+ Array.from(data).forEach(elem => {
+ WHIDList.push(elem.HItemID)
+ })
+
+ let sWhere = ` and HItemID in (${WHIDList.join(",")})`
+ this.getHBaseList({
+ sWhere: sWhere
+ })
+
+ } else {
+ this.getHBaseList()
+ }
+ },
+ async refreshHSourceBillState() {
+ this.HSourceBillNoFocus = false
+ await this.$nextTick(() => {
+ this.hform.HSourceBillNo = ""
+ this.HSourceBillNoFocus = true
+
+ })
+ },
+ async refreshBarCodeState() {
+ this.barCodeFocus = false
+ await this.$nextTick(() => {
+ this.hform.HBarCode = ""
+ this.barCodeFocus = true
+ })
+ },
+ playSound(e) {
+ const innerAudioContext = uni.createInnerAudioContext();
+ if (e == 1) {
+ innerAudioContext.src = '/static/success.wav';
+ } else {
+ innerAudioContext.src = '/static/jingbao.wav';
+ }
+ innerAudioContext.play(); // 鎾斁闊抽
+ },
+ //鎵爜
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
+ }
+
+ this.getCode(this.hform.HBarCode)
+ })
+ },
+ showBillList() {
+ this.$refs.billList.showPopup()
+ },
+ //鎵叾浠�(浠撳簱锛屼粨浣�)
+ // toScanData(e){
+ // uni.scanCode({
+ // onlyFromCamera: true,
+ // success: (res) => {
+ // console.log('鏉$爜鍐呭锛�' + res.result);
+ // var code = res.result
+ // if(e == 1){
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/GetWarehouse_Json',
+ // data: {HBarCode:code,HStockOrgID:uni.getStorageSync('OrganizationID')},
+ // success: (res) => {
+ // this.hform.HStockPlaceID = 0
+ // this.hform.HStockPlaceName = ''
+ // this.showHStockPlaceName = true
+ // if(res.data.count == 1){
+ // var data = res.data.data[0]
+ // this.hform.HWHID = data.HItemID
+ // this.hform.HWHName = data.HName
+ // if (data.HSPFlag == 0) {
+ // this.showHStockPlaceName = false
+ // }
+ // }else{
+ // this.hform.HWHID = 0
+ // this.hform.HWHName = ''
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'浠撳簱鏁版嵁璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ // }else if(e == 2){
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/GetStockPlace_Json',
+ // data: {HBarCode:code,HStockOrgID:uni.getStorageSync('OrganizationID'),HWhID: this.hform.HWHID},
+ // success: (res) => {
+ // if(res.data.count == 1){
+ // var data = res.data.data[0]
+ // this.hform.HWHID = data.HWHID
+ // this.hform.HWHName = data.HWhName
+ // this.hform.HStockPlaceID = data.HItemID
+ // this.hform.HStockPlaceName = data.HName
+ // }else{
+ // this.hform.HWHID = 0
+ // this.hform.HWHName = ''
+ // this.hform.HStockPlaceID = 0
+ // this.hform.HStockPlaceName = ''
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'浠撳簱鏁版嵁璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ // }
+ // }
+ // });
+ // },
+ //鏃ユ湡
+ HDateChange(e) {
+ console.log(e.detail.value)
+ this.hform.HDate = e.detail.value
+ },
+ //鍩虹浠撳簱璧勬枡
+ getHBaseList({sWhere = ''} = {}) {
+ uni.request({
+ url: this.serverUrl + '/Gy_Warehouse/list',
+ data: {
+ sWhere: sWhere,
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HWHNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
+ }
+ } else {
+ uni.showToast({
+ title: '浠撳簱鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+
+ uni.request({
+ url: this.serverUrl + '/Gy_StockPlace/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HStockPlaceNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHStockPlaceName[i] = res.data.data[i].浠撲綅鍚嶇О
+ }
+ } else {
+ uni.showToast({
+ title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+
+ // this.getHYDList()
+ },
+ // 閫氳繃鍗曟嵁绫诲瀷鑾峰彇婧愬崟绫诲瀷
+ async GetSourceBillType() {
+ CommonUtils.doRequest2({
+ url: '/Web/GetHSourceBillTypeByBillType',
+ data: {
+ HBillType: this.hform.HBillType,
+ Num: 2
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ console.log('data: ', data);
+ this.arrayHMainSourceBillType = []
+ this.arrayHMainSourceBillValue = []
+ Array.from(data).forEach(e => {
+ this.arrayHMainSourceBillType.push(e['HSourceBillTypeName'])
+ this.arrayHMainSourceBillValue.push(e['HSourceBillType'])
+ })
+
+ this.arrayHMainSourceBillType.push('鎵嬪伐褰曞叆')
+ this.arrayHMainSourceBillValue.push('-1')
+
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
+ this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+
+ })
+ },
+ //婧愬崟璧勬枡
+ getHYDList() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetSourceBillList_Json',
+ data: {
+ HBillType: this.hform.HBillType,
+ HSourceBillType: this.hform.HMainSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ HSourceBillNo: "",
+ HMater: "",
+ HCustom: ""
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HSourceBillNoList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHSourceBillNo[i] = res.data.data[i].鍗曟嵁鍙�
+ }
+ this.reHSourceBillNo = false
+ this.$nextTick(() => {
+ this.reHSourceBillNo = true
+ })
+ } else {
+ uni.showToast({
+ title: '婧愬崟鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨浠撳簱
+ HWHNameChange(e) {
+ // var name = e.split("(")
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HWHID = this.HWHNameList[i].HItemID
+
+ if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
+ this.showHStockPlaceName = true
+ } else {
+ this.hform.HStockPlaceName = ''
+ this.showHStockPlaceName = false
+ }
+ }
+ }
+ },
+ HFIFOWHNameChange(e) {
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HFIFOWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HFIFOWHID = this.HWHNameList[i].HItemID
+ }
+ }
+ },
+ //閫夋嫨浠撲綅
+ HStockPlaceNameChange(e) {
+ for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
+ if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
+ this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
+ this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID
+ }
+ }
+ },
+ //閫夋嫨婧愬崟
+ HSourceBillNoChange(e) {
+ this.hform.HSourceBillNo = e
+ this.getHBarCodeData(e)
+ // for(var i=0;i<this.HSourceBillNoList.length;i++){
+ // if(this.HSourceBillNoList[i].鍗曟嵁鍙� == e){
+ // this.hform.HSourceBillNo = this.HSourceBillNoList[i].鍗曟嵁鍙�
+ // }
+ // }
+ },
+ //閫夋嫨婧愬崟绫诲瀷
+ HMainSourceBillTypeChange(e) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value]
+ let index = this.arrayHMainSourceBillType.findIndex(e => e == this.HMainSourceBillType)
+ if (index != -1) {
+ this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[index]
+ // this.getHYDList()
+ }
+ },
+
+ //鑾峰彇瀹㈡埛鏁版嵁
+ getHSupList() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetSupplierList_Json',
+ data: {
+ Supplier: '',
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HSupNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHSupName[i] = res.data.data[i]['HName']
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '瀹㈡埛鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨
+ HSupNameChange(e) {
+ for (var i = 0; i < this.HSupNameList.length; i++) {
+ if (this.HSupNameList[i]['HName'] == e) {
+ this.hform.HSupID = this.HSupNameList[i].HItemID
+ this.hform.HSupName = this.HSupNameList[i]['HName']
+ }
+ }
+ },
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ getHDeptList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Department/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HDeptNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHDeptName[i] = res.data.data[i].閮ㄩ棬鍚嶇О
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '閮ㄩ棬鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨浣跨敤閮ㄩ棬
+ HDeptNameChange(e) {
+ for (var i = 0; i < this.HDeptNameList.length; i++) {
+ if (this.HDeptNameList[i].閮ㄩ棬鍚嶇О == e) {
+ this.hform.HDeptID = this.HDeptNameList[i].HItemID
+ this.hform.HDeptName = this.HDeptNameList[i].閮ㄩ棬鍚嶇О
+ }
+ }
+ },
+ //鎿嶄綔鍛�
+ getHEmpList() {
+ uni.request({
+ url: this.serverUrl + '/Web/GetEmployeeList_Json',
+ data: {
+ Employee: '',
+ HGroupID: 0
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HEmpNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHEmpName[i] = res.data.data[i].HName
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '浜哄憳鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //淇濈
+ HKeeperNameChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ console.log(this.HEmpNameList[i])
+ this.hform.HKeeperID = this.HEmpNameList[i].HItemID
+ this.hform.HKeeperName = this.HEmpNameList[i].HName
+ }
+ }
+ },
+ //楠屾敹
+ HSecManagerNameChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ this.hform.HSecManagerID = this.HEmpNameList[i].HItemID
+ this.hform.HSecManagerName = this.HEmpNameList[i].HName
+ }
+ }
+ },
+ //閫変腑婧愬崟
+ getHBarCodeData(HBarCode) {
+ if(this.hform.HMainSourceBillType == -1) {
+ this.playSound(1)
+ this.barCodeFocus = true
+ return
+ }
+ if (!this.hform.HFIFOWHName) {
+ this.hform.HFIFOWHID = 0
+ }
+ uni.request({
+ url: this.serverUrl + '/WEBSController/get_SourceBarCode_EntrustIn_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HSourceBillNo: HBarCode,
+ HSourceBillType: this.hform.HMainSourceBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID,
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ var data = res.data.data
+ console.log(2, data);
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ this.showHMainSourceBillType = false
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ this.tabs = 2
+ this.showHSupName = false
+ this.playSound(1)
+ this.barCodeFocus = true
+ this.DisBillEntryList()
+ } else {
+ this.playSound(0)
+ this.refreshHSourceBillState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshHSourceBillState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //鎵潯鐮佸鐞�
+ getCode(HBarCode) {
+ //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ var sOldBarCode = HBarCode
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+
+ var sHWHID = this.hform.HWHID
+ var sHSPID = this.hform.HStockPlaceID
+ var sHQty = this.hform.HQty
+ var sSourceBillNo = this.hform.HSourceBillNo
+ var sSourceBillType = this.hform.HMainSourceBillType
+ var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
+ console.log(this.hform.HSourceBillNo, HSourceFlag)
+ if (HDeleteFlag == "*") {
+ if (sBarCode == "") {
+ this.playSound(0)
+ uni.showToast({
+ title: '璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�',
+ icon: 'none'
+ })
+ } else {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ success: (res) => {
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.playSound(1)
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ } else {
+ var sBarCode = this.hform.HBarCode
+ if (sHQty == "") {
+ sHQty = 0;
+ }
+ uni.request({
+ url: this.serverUrl + '/WEBSController/Get_BarCode_Json',
+ data: {
+ sBarCode: sBarCode,
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ HRedBlueFlag: this.hform.HRedBlueFlag,
+ SourceFlag: HSourceFlag,
+ HSourceBillNo: sSourceBillNo,
+ HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ HScanStyle: "",
+ HCustom1: "",
+ HCustom2: ""
+ },
+ success: (res) => {
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.playSound(1)
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1604") {
+ // this.HMainSourceBillType = '濮斿鐢ㄦ枡娓呭崟'
+ // this.hform.HMainSourceBillType = 1604
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //瀹㈡埛涓嶅彲缂栬緫
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.tabs = 2
+ if (!this.hform.HSourceBillNo) {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ console.log('index: ',index);
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ }
+ }
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ },
+ //鐗╂枡淇℃伅
+ DisBillEntryList() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetBillEntryTmpList_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ success: (res) => {
+ console.log('鐗╂枡', res.data)
+ if (res.data.count == 1) {
+ var data = res.data.data
+ this.Materlist = data.Materlist
+ if (data.FIFOlist.length != 0) {
+ if (data.FIFOlist[0].HMaterID != 0) {
+ this.FIFOlist = data.FIFOlist
+ }
+ }
+ if (!data.BarCodeDetailslist[0].HBarCode) {
+ this.hform.HMaterName_B = ''
+ this.hform.HMaterModel_B = ''
+ this.hform.HBatchNo_B = ''
+ this.hform.HUnitName_B = ''
+ this.hform.HQty_B = ''
+ this.hform.HTMQty_B = ''
+ this.hform.HWHName_B = ''
+ this.hform.HSPName_B = ''
+ } else {
+ this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode
+ this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName
+ this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel
+ this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo
+ this.hform.HUnitName_B = data.BarCodeDetailslist[0].HUnitName
+ this.hform.HQty_B = data.BarCodeDetailslist[0].HQty
+ this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty
+ this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName
+ this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName
+ }
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //鍒犻櫎鐗╂枡鐮�
+ delMater(item) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄� " ' + item.鐗╂枡鍚嶇О + ' " 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
+ success: (res) => {
+ if (res.confirm) {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HMaterID: item.HMaterID,
+ HAuxPropID: item.HAuxPropID,
+ HMTONo: item.HMTONo,
+ HSourceInterID: item.HSourceInterID,
+ HSourceEntryID: item.HSourceEntryID,
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.DisBillEntryList()
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ }
+ });
+ },
+ //鏂板
+ getNewData() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetMaxBillNoAndID_Json',
+ data: {
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ // console.log(res.data)
+ if (res.data.count == 1) {
+ this.hform.HInterID = res.data.data[0].HInterID
+ this.hform.HBillNo = res.data.data[0].HBillNo
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //淇敼鍥炲~鏁版嵁
+ RoadBillMain(HInterID) {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json',
+ data: {
+ HInterID: HInterID,
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ console.log(33, res.data.data[0]);
+ if (res.data.count == 1) {
+ var data = res.data.data[0]
+ this.hform.HInterID = data.HInterID
+ this.hform.HBillNo = data.HBillNo
+ this.hform.HMainSourceBillType = data.HSourceBillType
+ this.hform.HSourceBillNo = data.HSourceBillNo
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.HSourceBillType
+ if (this.HMainSourceBillType != -1) {
+ this.showHSupName = false
+ }
+ }
+ // if (data.HSourceBillType == 1604) {
+ // this.hform.HMainSourceBillType = 1604
+ // this.HMainSourceBillType = '濮斿鐢ㄦ枡娓呭崟'
+ // this.showHSupName = false
+ // } else {
+ // this.hform.HMainSourceBillType = -1
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // }
+ this.showHMainSourceBillType = false
+
+ //闈炲婧愬崟妯″紡
+ if (data.HMulSourceBill == 0) {
+ this.showHSourceBillNo = false
+ }
+ this.hform.HDeptID = data.HDeptID
+ this.hform.HDeptName = data.HDeptName
+ this.hform.HSupID = data.HCusID
+ this.hform.HSupName = data.HCusName
+ this.DisBillEntryList()
+ this.tabs = 2
+ } else {
+ uni.showToast({
+ title: '鑾峰彇鏁版嵁鍥炲~澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ addNew() {
+ uni.redirectTo({
+ url: '/pages/weiwairuku/form?OperationType=1'
+ })
+ },
+ submit() {
+ //浠撳簱銆佷粨浣嶃�佷繚绠°�侀獙鏀躲�侀儴闂ㄣ�佸鎴锋枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ if (!this.hform.HKeeperName) {
+ this.hform.HKeeperID = 0
+ }
+ if (!this.hform.HSecManagerName) {
+ this.hform.HSecManagerID = 0
+ }
+ if (!this.hform.HDeptName) {
+ this.hform.HDeptID = 0
+ }
+ if (!this.hform.HSupName) {
+ this.hform.HSupID = 0
+ }
+ if (this.hform.HInterID == 0 || !this.hform.HInterID) {
+ uni.showToast({
+ title: '鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�',
+ icon: 'none'
+ })
+ } else if (!this.hform.HBillNo) {
+ uni.showToast({
+ title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�',
+ icon: 'none'
+ })
+ } else if (!this.Materlist || this.Materlist.length == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ var s = 0;
+ for (var i = 0; i < this.Materlist.length; i++) {
+ if (this.Materlist[i].鏁伴噺 > 0) {
+ s = 1;
+ }
+ }
+ if (s == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ uni.showLoading({
+ title: '璇风◢鍊�'
+ })
+ var sMainStr = JSON.stringify(this.hform);
+ uni.request({
+ url: this.serverUrl + '/WEBSController/set_SaveEntrustInBill_Json',
+ method: 'POST',
+ dataType: "json",
+ data: {
+ oMain: sMainStr
+ },
+ success: (res) => {
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/weiwairuku/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 500)
+ }
+ }
+ });
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ }
+ },
+
+ goBack() {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.navigateBack({
+ url: '/pages/shengchanlingliaoshengdan/table'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .form {
+ width: 668rpx;
+ margin: 20rpx auto;
+ padding-bottom: 240rpx;
+ }
+
+ .tab_area {
+ width: 100%;
+ height: 50rpx;
+ }
+
+ .other {
+ margin-top: 8rpx;
+ text-align: center;
+ font-size: 28rpx;
+ padding: 4rpx 18rpx;
+ color: #1890FF;
+ }
+
+ .tabs {
+ width: 100%;
+ display: flex;
+ border-bottom: 1px solid #ddd;
+ margin: 20rpx 0;
+
+ view {
+ width: 25%;
+ font-size: 30rpx;
+ color: #555;
+ text-align: center;
+ padding: 16rpx 0;
+ }
+
+ .on {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ padding: 6rpx 0;
+ gap: 12rpx;
+
+ .title {
+ width: 208rpx;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+
+ .right {
+ // width: 450rpx;
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ position: relative;
+ display: flex;
+
+ picker {
+ width: 100%;
+ }
+
+ .uni-combox {
+ width: 100%;
+ }
+ }
+
+ .righton {
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ input {
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ textarea {
+ width: 98%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ .icon-wrapper {
+ background-color: #3A78FF;
+
+ border-radius: 100%;
+ width: 52rpx;
+ height: 52rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .icon-wrapper[disabled] {
+ background-color: rgba(228, 228, 228, 1);
+ ;
+ pointer-events: none;
+ touch-action: none;
+ }
+
+ }
+
+ .bottom-btn {
+ width: 100%;
+ box-sizing: border-box;
+ // height: 120rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3A78FF;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ // position: absolute;
+ // right: 120rpx;
+ }
+
+ .btn-d {
+ background-color: #ff8901;
+ color: #fff;
+ }
+ }
+
+ .list {
+ width: 100%;
+
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/weiwairuku/table.vue b/pages/weiwairuku/table.vue
new file mode 100644
index 0000000..49203a0
--- /dev/null
+++ b/pages/weiwairuku/table.vue
@@ -0,0 +1,495 @@
+<template>
+ <view class="content">
+ <view class="tabs">
+ <view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">缂撳瓨鍒楄〃</view>
+ <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">宸叉牎楠屽垪琛�</view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="form" v-if="tabs == 0">
+ <view class="buttons" @tap="add">
+ <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>鏂板
+ </view>
+ </view>
+ <view class="form" v-if="tabs == 1">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right">
+ <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">婧愬崟鍗曞彿:</view>
+ <view class="right">
+ <input v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ </view>
+ </view>
+ <view class="buttons">
+ <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+ <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+ </view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
+ <uni-card :title="item.鍒跺崟鏃ユ湡.substr(0,10)" :extra="item.鍗曟嵁鍙�" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <view class="detail" v-if="item.鍒跺崟浜�">
+ <text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
+ </view>
+ <view class="detail" v-if="item.鍗曟嵁鍐呯爜">
+ <text>鍗曟嵁鍐呯爜锛�</text>{{item.鍗曟嵁鍐呯爜}}
+ </view>
+ <view class="detail" v-if="item.鏁伴噺">
+ <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ <view class="detail" v-if="item.婧愬崟鍗曞彿">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
+ </view>
+ <view class="detail" v-if="item.缁勭粐">
+ <text>缁勭粐锛�</text>{{item.缁勭粐}}
+ </view>
+ </view>
+
+ <view class="more">
+ <view class="part" style="border-right: 1px solid #eee;color: #3a78ff;" @tap.stop="edit(item)">
+ <uni-icons type="compose" style="color: #3a78ff;margin-right: 10rpx;" size="18"></uni-icons>缂栬緫
+ </view>
+ <view class="part" style="color: #da0000;" @tap.stop="del(item)">
+ <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" size="18"></uni-icons>鍒犻櫎
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==1">
+ <uni-card :title="item.鏃ユ湡" :extra="item.鍗曟嵁鍙�" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <view class="detail" v-if="item.鍒跺崟浜�">
+ <text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
+ </view>
+ <view class="detail" v-if="item.鏁伴噺">
+ <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ <view class="detail" v-if="item.婧愬崟鍗曞彿">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
+ </view>
+ <view class="detail" v-if="item.鐗╂枡浠g爜">
+ <text>鐗╂枡浠g爜锛�</text>{{item.鐗╂枡浠g爜}}
+ </view>
+ <view class="detail" v-if="item.鐗╂枡鍚嶇О">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
+ </view>
+ <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+ </view>
+ <view class="detail" v-if="item.缁勭粐">
+ <text>缁勭粐锛�</text>{{item.缁勭粐}}
+ </view>
+ </view>
+
+ <view class="more">
+ <view class="part" style="color: #d98d00;width: 100%;" @tap.stop="revoke(item)">
+ <uni-icons type="undo" style="color: #d98d00;margin-right: 10rpx;" size="18"></uni-icons>鎾ら攢
+ </view>
+ </view>
+ </uni-card>
+ </view>
+
+ <view class="over" v-if="!listData || listData.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="listData.length != 0 && listData.length != showList.length">鍔犺浇涓�...</view>
+ <view class="over" v-if="listData.length != 0 && listData.length == showList.length">宸插埌搴�</view>
+ </view>
+</template>
+
+<script>
+ import { getUserInfo } from "@/utils/auth.js";
+ export default {
+ data() {
+ return {
+ userInfo:getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
+ tabs:0,
+ urls:'/WEBSController/GetKf_PonderationBillMain_TempList_New_Json',
+ MvarReportTitle:'鐢熶骇棰嗘枡鍗曠紦瀛樺垪琛�',
+ hform:{
+ HBillNo:'',
+ HSourceBillNo:'',
+ HBillType: 1210,
+ HMaker: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ },
+ sWhere:'',
+ listData:[],
+ showList:[],
+ showDetail:-1,
+
+ page:1,
+ }
+ },
+ onShow() {
+ //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+ this.CheckModRight()
+ this.changeTab(0)
+ console.log(this.userInfo,uni.getStorageSync('HUserName'))
+ },
+ onReachBottom: function() {
+ this.page++
+ setTimeout(() => {
+ this.showList = this.showList.concat(this.getPage(this.page,this.listData))
+ }, 100)
+ },
+ onPullDownRefresh: function() {
+ this.clear()
+ setTimeout(()=>{
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ methods: {
+ CheckModRight(){
+ uni.request({
+ url: this.serverUrl + '/WEBSController/CheckModRight_Json',
+ data:{
+ ModRightName: 'CE_EntrustIn',
+ HUserName: uni.getStorageSync('HUserName')
+ },
+ success: (res) => {
+ if(res.data.count == 1){}else{
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ },
+ getPage(page,list){
+ let sindex = (parseInt(page) - 1) * 20
+ let eindex = parseInt(page) * 20
+ let newList = list.slice(sindex,eindex)
+ return newList
+ },
+ changeTab(e){
+ this.tabs = e
+ this.page = 1
+ this.showList = []
+
+ if(this.tabs == 0){
+ this.urls = '/WEBSController/GetKf_PonderationBillMain_TempList_New_Json'
+ }
+ if(this.tabs == 1){
+ this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json'
+ }
+ this.getList()
+ },
+ getList(){
+ uni.showLoading({
+ title:'鍔犺浇涓�...'
+ })
+ uni.request({
+ url: this.serverUrl + this.urls,
+ data:this.hform,
+ success: (res) => {
+ console.log(1,res);
+ if(res.data.count == 1){
+ this.listData = res.data.data
+ this.showList = this.getPage(this.page,this.listData)
+ setTimeout(()=>{
+ uni.hideLoading()
+ }, 1000)
+ }else{
+ uni.hideLoading()
+ this.listData = []
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ },
+ search(){
+ this.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ console.log(this.hform)
+ // if (this.hform.HBillNo) {
+ // this.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+ // }
+ // if (this.hform.HSourceBillNo) {
+ // this.sWhere += " and 璁惧绫诲瀷 like '%" + this.hform.HSourceBillNo + "%'";
+ // }
+ this.getList()
+ },
+ clear(){
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.sWhere = ''
+ this.hform = {
+ HBillNo:'',
+ HSourceBillNo:'',
+ HBillType: 1211,
+ HMaker: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ }
+ this.getList()
+ },
+ add(){
+ uni.navigateTo({
+ url:'./form?OperationType=1'
+ })
+ },
+ //缂栬緫
+ edit(item){
+ console.log(item)
+ uni.request({
+ url: this.serverUrl + '/WEBSController/TempList_Modify_Json',
+ data:{ "HInterID": item.HInterID, "HBillNo": item.鍗曟嵁鍙�, "HBillType": this.hform.HBillType },
+ success: (res) => {
+ console.log(1,res);
+ if(res.data.count == 1){
+ uni.navigateTo({
+ url:'./form?OperationType=2&HInterID=' + item.HInterID
+ })
+ }else{
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
+
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ })
+ },
+ //鍒犻櫎
+ del(item){
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄よ褰曪紵鍒犻櫎鍚庝笉鑳芥仮澶�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl + '/WEBSController/set_DelPonderationBillMain_Temp_New_Json',
+ data:{
+ HInterID: item.HInterID,
+ HBillNo: item.鍗曟嵁鍙�,
+ HBillType: this.hform.HBillType,
+ HMaker: uni.getStorageSync('HUserName'),
+ MvarReportTitle:this.MvarReportTitle,
+ },
+ success: (res) => {
+ console.log(1,res);
+ if(res.data.count == 1){
+ this.clear()
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ //鎾ら攢
+ revoke(item){
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '鏄惁纭鎾ら攢',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl + '/WEBSController/set_DeleteICStockBillAndWMS_Json',
+ data:{
+ HInterID: item.HInterID,
+ HBillNo: item.鍗曟嵁鍙�,
+ HBillType: this.hform.HBillType,
+ HMaker: uni.getStorageSync('HUserName'),
+ MvarReportTitle:this.MvarReportTitle,
+ },
+ success: (res) => {
+ console.log(1,res);
+ if(res.data.count == 1){
+ this.clear()
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .form{
+ width: 640rpx;
+ margin: 20rpx auto;
+ margin-top: 90rpx;
+ }
+ .tabs{
+ width: 100%;
+ position: fixed;
+ left: 0;
+ z-index: 9;
+ display: flex;
+ background-color: #e5e5e5;
+ view{
+ width: 50%;
+ font-size: 30rpx;
+ color: #333;
+ text-align: center;
+ padding: 16rpx 0;
+ }
+ .on{
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
+ .buttons{
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ margin-top: 20rpx;
+ button{
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+ .btn-a{
+ background-color: #acacac;
+ color: #fff;
+ }
+ .btn-b{
+ background-color: #41a863;
+ color: #fff;
+ }
+ .btn-c{
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+ .form-item{
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ padding: 6rpx 0;
+ .title{
+ width: 180rpx;
+ text{
+ color: red;
+ font-weight: bold;
+ }
+ }
+ .right{
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+ .righton{
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ input{
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+ }
+ .list{
+ width: 100%;
+ .card-detail{
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+ .detail{
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+ text{
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ .more{
+ color: #888;
+ font-size: 26rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+ .part{
+ width: 50%;
+ display: flex;align-items: center;justify-content: center;
+ }
+ }
+ }
+
+</style>
diff --git a/pages/xiaoshouchuku/form.vue b/pages/xiaoshouchuku/form.vue
index fce461e..8ef2c9e 100644
--- a/pages/xiaoshouchuku/form.vue
+++ b/pages/xiaoshouchuku/form.vue
@@ -1,67 +1,67 @@
<template>
- <view>
- <view class="form">
- <view class="form-item">
- <view class="title">鏉$爜:</view>
- <view class="right" style="width: 380rpx;">
- <input :focus="BarCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
- @confirm="getCode(hform.HBarCode)" />
- </view>
- <uni-icons type="scan"
- style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
- size="20" @click="toScanCode"></uni-icons>
- </view>
- <view class="form-item">
- <view class="title">鏁伴噺:</view>
- <view class="right">
- <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撳簱:</view>
- <view class="right">
- <uni-combox :candidates="arrayHWHName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撳簱" v-model="hform.HWHName"
- @input="HWHNameChange"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撲綅:</view>
- <view class="right" v-show="showHStockPlaceName">
- <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
- v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
- </view>
- <view class="righton" v-show="!showHStockPlaceName">
- <input v-model="hform.HStockPlaceName" disabled placeholder="涓嶅彲鎿嶄綔" />
- </view>
- </view>
+ <view>
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="right" style="width: 380rpx;">
+ <input :focus="BarCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+ @confirm="getCode(hform.HBarCode)" />
+ </view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanCode"></uni-icons>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="right">
+ <input v-model="hform.HQty" placeholder="璇疯緭鍏ユ暟閲�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHWHName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撳簱" v-model="hform.HWHName"
+ @input="HWHNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撲綅:</view>
+ <view class="right" v-show="showHStockPlaceName">
+ <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
+ v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHStockPlaceName">
+ <input v-model="hform.HStockPlaceName" disabled placeholder="涓嶅彲鎿嶄綔" />
+ </view>
+ </view>
- <view class="tabs">
- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view>
- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
- <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">鏉$爜淇℃伅</view>
- <view :class="tabs == 4 ? 'on':''" @tap="tabs = 4">涓嬫灦淇℃伅</view>
- </view>
+ <view class="tabs">
+ <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">閫夋嫨婧愬崟</view>
+ <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">琛ㄥご淇℃伅</view>
+ <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鐗╂枡淇℃伅</view>
+ <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">鏉$爜淇℃伅</view>
+ <view :class="tabs == 4 ? 'on':''" @tap="tabs = 4">涓嬫灦淇℃伅</view>
+ </view>
- <view v-if="tabs == 0">
- <view class="form-item">
- <view class="title">婧愬崟绫诲瀷:</view>
- <view class="right" v-show="showHMainSourceBillType">
- <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
- @change="HMainSourceBillTypeChange">
- <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
- placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
- <view class="picker-overlay"></view>
- </picker>
- </view>
- <view class="righton" v-show="!showHMainSourceBillType">
- <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
- placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">婧愬崟鍗曞彿:</view>
- <!-- <view class="right" v-show="showHSourceBillNo">
+ <view v-if="tabs == 0">
+ <view class="form-item">
+ <view class="title">婧愬崟绫诲瀷:</view>
+ <view class="right" v-show="showHMainSourceBillType">
+ <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
+ @change="HMainSourceBillTypeChange">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ <view class="righton" v-show="!showHMainSourceBillType">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">婧愬崟鍗曞彿:</view>
+ <!-- <view class="right" v-show="showHSourceBillNo">
<uni-combox v-if="reHSourceBillNo" :isFocus="HSourceBillNoFocus" ref="uniComboxSourceBill"
:confirm-call="onSourceBillConfirmHandler" :candidates="arrayHSourceBillNo"
placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" v-model="hform.HSourceBillNo"
@@ -70,1550 +70,1640 @@
<view class="righton" v-show="!showHSourceBillNo">
<input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
</view> -->
- <view class="right" v-show="showHSourceBillNo">
- <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
+ <view class="right" v-show="showHSourceBillNo">
+ <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
- <input :focus="HSourceBillNoFocus" type="text" @confirm="onSourceBillConfirmHandler"
- name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ <input :focus="HSourceBillNoFocus" type="text" @confirm="onSourceBillConfirmHandler"
+ name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
- </view>
- <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
- <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
- </view>
+ </view>
+ <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
+ <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+ </view>
- <view class="righton" v-show="!showHSourceBillNo">
- <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍏堣繘鍏堝嚭浠�:</view>
- <view class="right">
- <uni-combox :candidates="arrayHWHName" placeholder="璇烽�夋嫨" v-model="hform.HFIFOWHName"
- @input="HFIFOWHNameChange"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鏃ユ湡:</view>
- <view class="right">
- <picker mode="date" v-model="hform.HDate" @change="HDateChange">
- <input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
- <view class="picker-overlay"></view>
- </picker>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍒跺崟浜�:</view>
- <view class="righton">
- <input name="HMaker" disabled v-model="hform.HMaker" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="righton">
- <input name="HBillNo" disabled v-model="hform.HBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁ID:</view>
- <view class="righton">
- <input name="HInterID" disabled v-model="hform.HInterID" />
- </view>
- </view>
- </view>
+ <view class="righton" v-show="!showHSourceBillNo">
+ <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍏堣繘鍏堝嚭浠�:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHWHName" placeholder="璇烽�夋嫨" v-model="hform.HFIFOWHName"
+ @input="HFIFOWHNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏃ユ湡:</view>
+ <view class="right">
+ <picker mode="date" v-model="hform.HDate" @change="HDateChange">
+ <input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍒跺崟浜�:</view>
+ <view class="righton">
+ <input name="HMaker" disabled v-model="hform.HMaker" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input name="HBillNo" disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁ID:</view>
+ <view class="righton">
+ <input name="HInterID" disabled v-model="hform.HInterID" />
+ </view>
+ </view>
+ </view>
- <view v-if="tabs == 1">
- <view class="form-item">
- <view class="title">淇濈:</view>
- <view class="right">
- <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨淇濈鍛�" v-model="hform.HKeeperName"
- @input="HKeeperNameChange"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">楠屾敹:</view>
- <view class="right">
- <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨楠屾敹鍛�" v-model="hform.HSecManagerName"
- @input="HSecManagerNameChange"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">閮ㄩ棬:</view>
- <view class="right">
- <uni-combox :candidates="arrayHDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" v-model="hform.HDeptName"
- @input="HDeptNameChange"></uni-combox>
- </view>
- </view>
- <view class="form-item">
- <view class="title">瀹㈡埛:</view>
- <!-- <view class="right" v-show="showHSupName">
+ <view v-if="tabs == 1">
+ <view class="form-item">
+ <view class="title">淇濈:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨淇濈鍛�" v-model="hform.HKeeperName"
+ @input="HKeeperNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">楠屾敹:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨楠屾敹鍛�" v-model="hform.HSecManagerName"
+ @input="HSecManagerNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" v-model="hform.HDeptName"
+ @input="HDeptNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹㈡埛:</view>
+ <!-- <view class="right" v-show="showHSupName">
<uni-combox :candidates="arrayHSupName" placeholder="璇烽�夋嫨瀹㈡埛" v-model="hform.HSupName"
@input="HSupNameChange"></uni-combox>
</view> -->
- <view class="righton">
- <input name="HSupName" disabled v-model="hform.HSupName" placeholder="" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁勭粐:</view>
- <view class="righton">
- <input name="HStockOrgName" disabled v-model="hform.HStockOrgName" />
- </view>
- </view>
- </view>
+ <view class="righton">
+ <input name="HSupName" disabled v-model="hform.HSupName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁勭粐:</view>
+ <view class="righton">
+ <input name="HStockOrgName" disabled v-model="hform.HStockOrgName" />
+ </view>
+ </view>
+ </view>
- <view v-if="tabs == 2">
- <view class="list" v-for="(item,index) in Materlist" :key="index">
- <uni-card :title="item.鐗╂枡鍚嶇О" :extra="item.鐗╂枡浠g爜" style="margin: 10px;" @tap="delMater(item)">
- <view class="card-detail">
- <view class="detail">
- <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
- </view>
- <view class="detail">
- <text>婧愬崟鏁伴噺锛�</text>{{item.婧愬崟鏁伴噺}}
- </view>
- <view class="detail">
- <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
- </view>
- <view class="detail">
- <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
- </view>
- <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
- <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
- </view>
- <view class="detail" v-if="item.杈呭姪灞炴��">
- <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
- </view>
- </view>
- </uni-card>
- </view>
- <view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
- </view>
+ <view v-if="tabs == 2">
+ <view class="list" v-for="(item,index) in Materlist" :key="index">
+ <uni-card :title="item.鐗╂枡鍚嶇О" :extra="item.鐗╂枡浠g爜" style="margin: 10px;" @tap="delMater(item)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
+ </view>
+ <view class="detail">
+ <text>婧愬崟鏁伴噺锛�</text>{{item.婧愬崟鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
+ </view>
+ <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+ </view>
+ <view class="detail" v-if="item.杈呭姪灞炴��">
+ <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
- <view v-if="tabs == 4">
- <view class="list" v-for="(item,index) in FIFOlist" :key="index">
- <uni-card :title="item.HMaterName" :extra="item.HMaterNumber" style="margin: 10px;"
- @tap="delMater(item)">
- <view class="card-detail">
- <view class="detail">
- <text>鏁伴噺锛�</text>{{item.HQty}}
- </view>
- <view class="detail">
- <text>涓嬫灦鏁伴噺锛�</text>{{item.HQtyMust}}
- </view>
- <view class="detail">
- <text>浠撳簱锛�</text>{{item.HWhName}}
- </view>
- <view class="detail">
- <text>浠撲綅锛�</text>{{item.HSPName}}
- </view>
- <view class="detail">
- <text>瑙勬牸鍨嬪彿锛�</text>{{item.HMaterModel}}
- </view>
- <view class="detail" v-if="item.HBatchNo">
- <text>鎵瑰彿锛�</text>{{item.HBatchNo}}
- </view>
- <view class="detail" v-if="item.HAuxPropName">
- <text>杈呭姪灞炴�э細</text>{{item.HAuxPropName}}
- </view>
- </view>
- </uni-card>
- </view>
- <view class="over" v-if="FIFOlist.length == 0">鏆傛棤鏁版嵁</view>
- </view>
+ <view v-if="tabs == 4">
+ <view class="list" v-for="(item,index) in FIFOlist" :key="index">
+ <uni-card :title="item.HMaterName" :extra="item.HMaterNumber" style="margin: 10px;"
+ @tap="delMater(item)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.HQty}}
+ </view>
+ <view class="detail">
+ <text>涓嬫灦鏁伴噺锛�</text>{{item.HQtyMust}}
+ </view>
+ <view class="detail">
+ <text>浠撳簱锛�</text>{{item.HWhName}}
+ </view>
+ <view class="detail">
+ <text>浠撲綅锛�</text>{{item.HSPName}}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.HMaterModel}}
+ </view>
+ <view class="detail" v-if="item.HBatchNo">
+ <text>鎵瑰彿锛�</text>{{item.HBatchNo}}
+ </view>
+ <view class="detail" v-if="item.HAuxPropName">
+ <text>杈呭姪灞炴�э細</text>{{item.HAuxPropName}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="FIFOlist.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
- <view v-if="tabs == 3">
- <view class="form-item">
- <view class="title">鏉$爜:</view>
- <view class="righton">
- <input name="HBarCode_B" disabled v-model="hform.HBarCode_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鐗╂枡:</view>
- <view class="righton">
- <input disabled v-model="hform.HMaterName_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瑙勬牸:</view>
- <view class="righton">
- <input disabled v-model="hform.HMaterModel_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鎵规:</view>
- <view class="righton">
- <input disabled v-model="hform.HBatchNo_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曚綅:</view>
- <view class="righton">
- <input disabled v-model="hform.HUnitName_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鏁伴噺:</view>
- <view class="righton">
- <input disabled v-model="hform.HQty_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瀹归噺:</view>
- <view class="righton">
- <input disabled v-model="hform.HTMQty_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撳簱:</view>
- <view class="righton">
- <input disabled v-model="hform.HWHName_B" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浠撲綅:</view>
- <view class="righton">
- <input disabled v-model="hform.HSPName_B" />
- </view>
- </view>
- </view>
+ <view v-if="tabs == 3">
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="righton">
+ <input name="HBarCode_B" disabled v-model="hform.HBarCode_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HMaterName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HMaterModel_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鎵规:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBatchNo_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曚綅:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HUnitName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HQty_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹归噺:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HTMQty_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HWHName_B" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撲綅:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HSPName_B" />
+ </view>
+ </view>
+ </view>
- <view class="bottom-btn">
- <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
- <view style="flex: 1;"></view>
- <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
- <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
- </view>
- </view>
- <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
- :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
- </view>
+ <view class="bottom-btn">
+ <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <view style="flex: 1;"></view>
+ <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+ </view>
+ <PushSeOutStockBillPopupVue v-if="enableModule == 1" ref="billList" :HBillType="hform.HBillType"
+ :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"></PushSeOutStockBillPopupVue>
+ <BillListPopupVue v-else-if="enableModule == 2" ref="billList" :HBillType="hform.HBillType"
+ :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
+ </view>
</template>
<script>
- import getDateTime from '@/utils/getdateTime.js';
- import {
- getUserInfo
- } from "@/utils/auth.js";
- import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue';
- import {
- getUserStockRelation
- } from '../../utils/userRelationManager';
- export default {
- data() {
- return {
- userInfo: getUserInfo(),
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
- HModName: 'Kf_SellOutBill_PDA',
- ModRightName: 'CE_SellOut',
- OperationType: 1,
- HInterID_Temp: '',
+ import getDateTime from '@/utils/getdateTime.js';
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue';
+ import PushSeOutStockBillPopupVue from '../../components/PushSeOutStockBillPopup/PushSeOutStockBillPopup.vue';
+ import {
+ getUserStockRelation
+ } from '../../utils/userRelationManager';
+ import {
+ CommonUtils
+ } from '../../utils/common';
+ export default {
+ data() {
+ return {
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ HModName: 'Kf_SellOutBill_PDA',
+ ModRightName: 'CE_SellOut',
+ OperationType: 1,
+ HInterID_Temp: '',
- showHStockPlaceName: false,
- showHMainSourceBillType: true,
- showHSourceBillNo: true,
- reHSourceBillNo: true,
- showHSupName: true,
- BarCodeFocus: false,
- HSourceBillNoFocus: false,
+ showHStockPlaceName: false,
+ showHMainSourceBillType: true,
+ showHSourceBillNo: true,
+ reHSourceBillNo: true,
+ showHSupName: true,
+ BarCodeFocus: false,
+ HSourceBillNoFocus: false,
+ materMeta: [
- tabs: 0,
- HMainSourceBillType: '鍙戣揣閫氱煡鍗�',
- arrayHMainSourceBillType: ['鍙戣揣閫氱煡鍗�', '閿�鍞鍗�', '鎵嬪伐褰曞叆'],
+ ],
- linterid: '',
- HBillNo: '',
- btnType: 0, //0鏂板锛�1淇敼锛�2瀹℃牳锛�3鍙嶅鏍�
- showmore: false,
+ tabs: 0,
+ HMainSourceBillType: '鍙戣揣閫氱煡鍗�',
+ arrayHMainSourceBillType: ['鍙戣揣閫氱煡鍗�', '閿�鍞鍗�', '鎵嬪伐褰曞叆'],
- arrayHWHName: [], //浠撳簱
- HWHNameList: [],
- arrayHStockPlaceName: [], //浠撲綅
- HStockPlaceNameList: [],
- arrayHSourceBillNo: [], //婧愬崟鍗曞彿
- HSourceBillNoList: [],
+ linterid: '',
+ HBillNo: '',
+ btnType: 0, //0鏂板锛�1淇敼锛�2瀹℃牳锛�3鍙嶅鏍�
+ showmore: false,
- arrayHEmpName: [], //鎿嶄綔鍛�
- HEmpNameList: [],
- arrayHDeptName: [], //閮ㄩ棬
- HDeptNameList: [],
- arrayHSupName: [], //瀹㈡埛
- HSupNameList: [],
+ arrayHWHName: [], //浠撳簱
+ HWHNameList: [],
+ arrayHStockPlaceName: [], //浠撲綅
+ HStockPlaceNameList: [],
+ arrayHSourceBillNo: [], //婧愬崟鍗曞彿
+ HSourceBillNoList: [],
- Materlist: [],
- FIFOlist: [],
- hform: {
- HBillType: 1205,
- HBillerID: uni.getStorageSync('HBillerID'),
- HRedBlueFlag: false,
+ arrayHEmpName: [], //鎿嶄綔鍛�
+ HEmpNameList: [],
+ arrayHDeptName: [], //閮ㄩ棬
+ HDeptNameList: [],
+ arrayHSupName: [], //瀹㈡埛
+ HSupNameList: [],
- HBarCode: '',
- HQty: '',
- HWHName: getUserInfo().HWHName,
- HWHID: getUserInfo().HWhID,
- HStockPlaceName: getUserInfo().HSPName,
- HStockPlaceID: getUserInfo().HSPID,
+ Materlist: [],
+ FIFOlist: [],
+ hform: {
+ HBillType: 1205,
+ HBillerID: uni.getStorageSync('HBillerID'),
+ HRedBlueFlag: false,
- HMainSourceBillType: 1402,
- HSourceBillNo: '', //CGDD000200
- HFIFOWHName: '',
- HFIFOWHID: '',
- HDate: getDateTime.dateTimeStr('y-m-d'),
- HMaker: uni.getStorageSync('HUserName'),
- HBillNo: '',
- HInterID: '',
+ HBarCode: '',
+ HQty: '',
+ HWHName: getUserInfo().HWHName,
+ HWHID: getUserInfo().HWhID,
+ HStockPlaceName: getUserInfo().HSPName,
+ HStockPlaceID: getUserInfo().HSPID,
- HKeeperName: getUserInfo().HKeeper,
- HKeeperID: getUserInfo().HKeeperID,
- HSecManagerName: getUserInfo().HSecManager,
- HSecManagerID: getUserInfo().HSecManagerID,
- HDeptName: getUserInfo().HDept,
- HDeptID: getUserInfo().HDeptID,
- HSupName: '',
- HSupID: '',
- HStockOrgName: uni.getStorageSync('Organization'),
- HStockOrgID: uni.getStorageSync('OrganizationID'),
+ HMainSourceBillType: 1402,
+ HSourceBillNo: '', //CGDD000200
+ HFIFOWHName: '',
+ HFIFOWHID: '',
+ HDate: getDateTime.dateTimeStr('y-m-d'),
+ HMaker: uni.getStorageSync('HUserName'),
+ HBillNo: '',
+ HInterID: '',
- HBarCode_B: '',
- HMaterName_B: '',
- HMaterModel_B: '',
- HBatchNo_B: '',
- HUnitName_B: '',
- HQty_B: '',
- HTMQty_B: '',
- HWHName_B: '',
- HSPName_B: '',
- }
- }
- },
- components: {
- BillListPopupVue
- },
- onLoad(e) {
- console.log(e, this.userInfo)
- this.OperationType = e.OperationType
- if (e.HInterID) {
- this.HInterID_Temp = e.HInterID
- // this.btnType = 1
- this.refreshBarCodeState()
- this.RoadBillMain(e.HInterID)
- } else {
- this.refreshHSourceBillState()
- this.getNewData()
- }
- // this.getHBaseList()
- this.getHSupList()
- this.getHEmpList()
- this.getHDeptList()
+ HKeeperName: getUserInfo().HKeeper,
+ HKeeperID: getUserInfo().HKeeperID,
+ HSecManagerName: getUserInfo().HSecManager,
+ HSecManagerID: getUserInfo().HSecManagerID,
+ HDeptName: getUserInfo().HDept,
+ HDeptID: getUserInfo().HDeptID,
+ HSupName: '',
+ HSupID: '',
+ HStockOrgName: uni.getStorageSync('Organization'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
- this.getRelationStore()
+ HBarCode_B: '',
+ HMaterName_B: '',
+ HMaterModel_B: '',
+ HBatchNo_B: '',
+ HUnitName_B: '',
+ HQty_B: '',
+ HTMQty_B: '',
+ HWHName_B: '',
+ HSPName_B: '',
+ }
+ }
+ },
+ components: {
+ BillListPopupVue,
+ PushSeOutStockBillPopupVue
+ },
+ computed: {
+ enableModule: {
+ get() {
+ console.log('typeof(Organization): ',typeof(uni.getStorageSync('Organization')));
+ if (this.hform.HMainSourceBillType == 1402 && uni.getStorageSync('Organization').includes('鍏磋揪')) {
+ return 1
+ } else {
+ return 2
+ }
+ }
- uni.$on('BillSelectComplete', (e) => {
- console.log("鎺ユ敹鍒扮殑娑堟伅: ", e.HBillNo)
- this.getHBarCodeData(e.HBillNo)
- this.$refs.billList.exit()
- })
- },
- onUnload() {
- uni.$off('BillSelectComplete')
- },
- methods: {
- async getRelationStore() {
- let {
- data,
- count
- } = await getUserStockRelation()
- if (count == 1) {
- let WHIDList = []
+ // 鍏朵粬鏉′欢
+ },
+ },
+ onLoad(e) {
+ console.log(e, this.userInfo)
+ this.OperationType = e.OperationType
+ if (e.HInterID) {
+ this.HInterID_Temp = e.HInterID
+ // this.btnType = 1
+ this.refreshBarCodeState()
+ this.RoadBillMain(e.HInterID)
+ } else {
+ this.refreshHSourceBillState()
+ this.getNewData()
+ }
+ // this.getHBaseList()
+ this.getHSupList()
+ this.getHEmpList()
+ this.getHDeptList()
+ console.log('enableModule: ', this.enableModule);
+ this.getRelationStore()
- Array.from(data).forEach(elem => {
- WHIDList.push(elem.HItemID)
- })
+ uni.$on('BillSelectComplete', (e) => {
+ console.log("鎺ユ敹鍒扮殑娑堟伅: ", e.HBillNo)
+ this.getHBarCodeData(e.HBillNo)
+ this.$refs.billList.exit()
+ })
+ },
+ onUnload() {
+ uni.$off('BillSelectComplete')
+ },
+ methods: {
- let sWhere = ` and HItemID in (${WHIDList.join(",")})`
- this.getHBaseList({
- sWhere: sWhere
- })
+ async getRelationStore() {
+ let {
+ data,
+ count
+ } = await getUserStockRelation()
+ if (count == 1) {
+ let WHIDList = []
- } else {
- this.getHBaseList()
- }
- },
- async refreshHSourceBillState() {
- this.HSourceBillNoFocus = false
- await this.$nextTick(() => {
- this.hform.HSourceBillNo = ""
- this.HSourceBillNoFocus = true
- })
- if (this.hform.HMainSourceBillType == -1) {
- await this.refreshBarCodeState()
- }
- },
- async refreshBarCodeState() {
- this.BarCodeFocus = false
- await this.$nextTick(() => {
- this.hform.HBarCode = ""
- this.BarCodeFocus = true
- })
- },
- playSound(e) {
- const innerAudioContext = uni.createInnerAudioContext();
- if (e == 1) {
- innerAudioContext.src = '/static/success.wav';
- } else {
- innerAudioContext.src = '/static/jingbao.wav';
- }
- innerAudioContext.play(); // 鎾斁闊抽
- },
- onSourceBillConfirmHandler() {
- if (this.hform.HMainSourceBillType == -1) {
- this.playSound(1)
- this.BarCodeFocus = true
- return
- }
- let inputVal = ''
- if(this.$refs.uniComboxSourceBill){
- inputVal = this.$refs.uniComboxSourceBill.inputVal || this.hform.HBillNo
- }else {
- inputVal = this.hform.HBillNo
- }
-
- if (inputVal == '') {
- CommonUtils.playSound(0)
- return uni.showToast({
- icon: 'none',
- Message: '婧愬崟鍗曞彿涓嶅緱涓虹┖...'
- })
- }
- this.getHBarCodeData(inputVal)
- },
- //鎵爜
- toScanCode() {
- var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
- mpaasScanModule.mpaasScan({
- 'hideAlbum': true,
- 'timeoutInterval': '10', //瓒呮椂鏃堕棿
- 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
- }, (ret) => {
- console.log(ret.resp_result)
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
- } else {
- this.hform.HBarCode = ret.resp_result
- }
+ Array.from(data).forEach(elem => {
+ WHIDList.push(elem.HItemID)
+ })
- this.getCode(this.hform.HBarCode)
- })
- },
- showBillList() {
- this.$refs.billList.showPopup()
- },
- //鎵叾浠�(浠撳簱锛屼粨浣�)
- // toScanData(e){
- // uni.scanCode({
- // onlyFromCamera: true,
- // success: (res) => {
- // console.log('鏉$爜鍐呭锛�' + res.result);
- // var code = res.result
- // if(e == 1){
- // uni.request({
- // url: this.serverUrl + '/WEBSController/GetWarehouse_Json',
- // data: {HBarCode:code,HStockOrgID:uni.getStorageSync('OrganizationID')},
- // success: (res) => {
- // this.hform.HStockPlaceID = 0
- // this.hform.HStockPlaceName = ''
- // this.showHStockPlaceName = true
- // if(res.data.count == 1){
- // var data = res.data.data[0]
- // this.hform.HWHID = data.HItemID
- // this.hform.HWHName = data.HName
- // if (data.HSPFlag == 0) {
- // this.showHStockPlaceName = false
- // }
- // }else{
- // this.hform.HWHID = 0
- // this.hform.HWHName = ''
- // uni.showToast({
- // title:res.data.Message,
- // icon:'none'
- // })
- // }
- // },
- // fail: (res) => {
- // console.log(res);
- // uni.showToast({
- // title:'浠撳簱鏁版嵁璇锋眰澶辫触',
- // icon:'none'
- // })
- // },
- // });
- // }else if(e == 2){
- // uni.request({
- // url: this.serverUrl + '/WEBSController/GetStockPlace_Json',
- // data: {HBarCode:code,HStockOrgID:uni.getStorageSync('OrganizationID'),HWhID: this.hform.HWHID},
- // success: (res) => {
- // if(res.data.count == 1){
- // var data = res.data.data[0]
- // this.hform.HWHID = data.HWHID
- // this.hform.HWHName = data.HWhName
- // this.hform.HStockPlaceID = data.HItemID
- // this.hform.HStockPlaceName = data.HName
- // }else{
- // this.hform.HWHID = 0
- // this.hform.HWHName = ''
- // this.hform.HStockPlaceID = 0
- // this.hform.HStockPlaceName = ''
- // uni.showToast({
- // title:res.data.Message,
- // icon:'none'
- // })
- // }
- // },
- // fail: (res) => {
- // console.log(res);
- // uni.showToast({
- // title:'浠撳簱鏁版嵁璇锋眰澶辫触',
- // icon:'none'
- // })
- // },
- // });
- // }
- // }
- // });
- // },
- //鏃ユ湡
- HDateChange(e) {
- console.log(e.detail.value)
- this.hform.HDate = e.detail.value
- },
- //鍩虹浠撳簱璧勬枡
- getHBaseList({
- sWhere = ''
- } = {}) {
- uni.request({
- url: this.serverUrl + '/Gy_Warehouse/list',
- data: {
- sWhere: sWhere,
- user: uni.getStorageSync('HUserName'),
- Organization: uni.getStorageSync('Organization')
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HWHNameList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
- }
+ let sWhere = ` and HItemID in (${WHIDList.join(",")})`
+ this.getHBaseList({
+ sWhere: sWhere
+ })
- // this.HStockPlaceNameChange(res.data.data[0].浠撳簱鍚嶇О)
- } else {
- uni.showToast({
- title: '浠撳簱鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
+ } else {
+ this.getHBaseList()
+ }
+ },
+ async refreshHSourceBillState() {
+ this.HSourceBillNoFocus = false
+ await this.$nextTick(() => {
+ this.hform.HSourceBillNo = ""
+ this.HSourceBillNoFocus = true
+ })
+ if (this.hform.HMainSourceBillType == -1) {
+ await this.refreshBarCodeState()
+ }
+ },
+ async refreshBarCodeState() {
+ this.BarCodeFocus = false
+ await this.$nextTick(() => {
+ this.hform.HBarCode = ""
+ this.BarCodeFocus = true
+ })
+ },
+ playSound(e) {
+ const innerAudioContext = uni.createInnerAudioContext();
+ if (e == 1) {
+ innerAudioContext.src = '/static/success.wav';
+ } else {
+ innerAudioContext.src = '/static/jingbao.wav';
+ }
+ innerAudioContext.play(); // 鎾斁闊抽
+ },
+ onSourceBillConfirmHandler() {
+ if (this.hform.HMainSourceBillType == -1) {
+ this.playSound(1)
+ this.BarCodeFocus = true
+ return
+ }
+ let inputVal = ''
+ if (this.$refs.uniComboxSourceBill) {
+ inputVal = this.$refs.uniComboxSourceBill.inputVal || this.hform.HBillNo
+ } else {
+ inputVal = this.hform.HBillNo
+ }
- uni.request({
- url: this.serverUrl + '/Gy_StockPlace/list',
- data: {
- sWhere: "",
- user: uni.getStorageSync('HUserName'),
- Organization: uni.getStorageSync('Organization')
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HStockPlaceNameList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHStockPlaceName[i] = res.data.data[i].浠撲綅鍚嶇О
- }
- } else {
- uni.showToast({
- title: '浠撲綅鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
+ if (inputVal == '') {
+ CommonUtils.playSound(0)
+ return uni.showToast({
+ icon: 'none',
+ Message: '婧愬崟鍗曞彿涓嶅緱涓虹┖...'
+ })
+ }
+ this.getHBarCodeData(inputVal)
+ },
+ //鎵爜
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
+ }
- // this.getHYDList()
- },
- //婧愬崟璧勬枡
- getHYDList() {
- uni.request({
- url: this.serverUrl + '/WEBSController/GetSourceBillList_Json',
- data: {
- HBillType: this.hform.HBillType,
- HSourceBillType: this.hform.HMainSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- HSourceBillNo: "",
- HMater: "",
- HCustom: ""
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HSourceBillNoList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHSourceBillNo[i] = res.data.data[i].鍗曟嵁鍙�
- }
- this.reHSourceBillNo = false
- this.$nextTick(() => {
- this.reHSourceBillNo = true
- })
- } else {
- uni.showToast({
- title: '婧愬崟鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //閫夋嫨浠撳簱
- HWHNameChange(e) {
- // var name = e.split("(")
- for (var i = 0; i < this.HWHNameList.length; i++) {
- if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
- this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
- this.hform.HWHID = this.HWHNameList[i].HItemID
+ this.getCode(this.hform.HBarCode)
+ })
+ },
+ showBillList() {
+ this.$refs.billList.showPopup()
+ },
+ //鎵叾浠�(浠撳簱锛屼粨浣�)
+ // toScanData(e){
+ // uni.scanCode({
+ // onlyFromCamera: true,
+ // success: (res) => {
+ // console.log('鏉$爜鍐呭锛�' + res.result);
+ // var code = res.result
+ // if(e == 1){
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/GetWarehouse_Json',
+ // data: {HBarCode:code,HStockOrgID:uni.getStorageSync('OrganizationID')},
+ // success: (res) => {
+ // this.hform.HStockPlaceID = 0
+ // this.hform.HStockPlaceName = ''
+ // this.showHStockPlaceName = true
+ // if(res.data.count == 1){
+ // var data = res.data.data[0]
+ // this.hform.HWHID = data.HItemID
+ // this.hform.HWHName = data.HName
+ // if (data.HSPFlag == 0) {
+ // this.showHStockPlaceName = false
+ // }
+ // }else{
+ // this.hform.HWHID = 0
+ // this.hform.HWHName = ''
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'浠撳簱鏁版嵁璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ // }else if(e == 2){
+ // uni.request({
+ // url: this.serverUrl + '/WEBSController/GetStockPlace_Json',
+ // data: {HBarCode:code,HStockOrgID:uni.getStorageSync('OrganizationID'),HWhID: this.hform.HWHID},
+ // success: (res) => {
+ // if(res.data.count == 1){
+ // var data = res.data.data[0]
+ // this.hform.HWHID = data.HWHID
+ // this.hform.HWHName = data.HWhName
+ // this.hform.HStockPlaceID = data.HItemID
+ // this.hform.HStockPlaceName = data.HName
+ // }else{
+ // this.hform.HWHID = 0
+ // this.hform.HWHName = ''
+ // this.hform.HStockPlaceID = 0
+ // this.hform.HStockPlaceName = ''
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // }
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'浠撳簱鏁版嵁璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ // }
+ // }
+ // });
+ // },
+ //鏃ユ湡
+ HDateChange(e) {
+ console.log(e.detail.value)
+ this.hform.HDate = e.detail.value
+ },
+ //鍩虹浠撳簱璧勬枡
+ getHBaseList({
+ sWhere = ''
+ } = {}) {
+ uni.request({
+ url: this.serverUrl + '/Gy_Warehouse/list',
+ data: {
+ sWhere: sWhere,
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HWHNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHWHName[i] = res.data.data[i].浠撳簱鍚嶇О
+ }
- console.log(this.HWHNameList[i]['鍚敤浠撲綅'])
+ // this.HStockPlaceNameChange(res.data.data[0].浠撳簱鍚嶇О)
+ } else {
+ uni.showToast({
+ title: '浠撳簱鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
- if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
- this.showHStockPlaceName = true
- } else {
- this.hform.HStockPlaceName = ''
- this.showHStockPlaceName = false
- }
- }
- }
- },
- HFIFOWHNameChange(e) {
- for (var i = 0; i < this.HWHNameList.length; i++) {
- if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
- this.hform.HFIFOWHName = this.HWHNameList[i].浠撳簱鍚嶇О
- this.hform.HFIFOWHID = this.HWHNameList[i].HItemID
- }
- }
- },
- //閫夋嫨浠撲綅
- HStockPlaceNameChange(e) {
- for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
- if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
- this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
- this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID
- }
- }
- },
- //閫夋嫨婧愬崟
- HSourceBillNoChange(e) {
- this.hform.HSourceBillNo = e
- this.getHBarCodeData(e)
- // for(var i=0;i<this.HSourceBillNoList.length;i++){
- // if(this.HSourceBillNoList[i].鍗曟嵁鍙� == e){
- // this.hform.HSourceBillNo = this.HSourceBillNoList[i].鍗曟嵁鍙�
- // }
- // }
- },
- //閫夋嫨婧愬崟绫诲瀷
- HMainSourceBillTypeChange(e) {
- this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value]
- if (this.HMainSourceBillType == '鍙戣揣閫氱煡鍗�') {
- this.hform.HMainSourceBillType = 1402
- // this.getHYDList()
- } else if (this.HMainSourceBillType == '閿�鍞鍗�') {
- this.hform.HMainSourceBillType = 1401
- // this.getHYDList()
- } else {
- this.hform.HMainSourceBillType = -1
- // this.getHYDList()
- }
- },
+ uni.request({
+ url: this.serverUrl + '/Gy_StockPlace/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HStockPlaceNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHStockPlaceName[i] = res.data.data[i].浠撲綅鍚嶇О
+ }
+ } else {
+ uni.showToast({
+ title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
- //鑾峰彇瀹㈡埛鏁版嵁
- getHSupList() {
- uni.request({
- url: this.serverUrl + '/Gy_Customer/list',
- data: {
- sWhere: "",
- user: uni.getStorageSync('HUserName'),
- Organization: uni.getStorageSync('Organization')
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HSupNameList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHSupName[i] = res.data.data[i].瀹㈡埛鍚嶇О
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '瀹㈡埛鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //閫夋嫨瀹㈡埛
- HSupNameChange(e) {
- for (var i = 0; i < this.HSupNameList.length; i++) {
- if (this.HSupNameList[i].瀹㈡埛鍚嶇О == e) {
- this.hform.HSupID = this.HSupNameList[i].HItemID
- this.hform.HSupName = this.HSupNameList[i].瀹㈡埛鍚嶇О
- }
- }
- },
- //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
- getHDeptList() {
- uni.request({
- url: this.serverUrl + '/Gy_Department/list',
- data: {
- sWhere: "",
- user: uni.getStorageSync('HUserName'),
- Organization: uni.getStorageSync('Organization')
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HDeptNameList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHDeptName[i] = res.data.data[i].閮ㄩ棬鍚嶇О
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: '閮ㄩ棬鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //閫夋嫨浣跨敤閮ㄩ棬
- HDeptNameChange(e) {
- for (var i = 0; i < this.HDeptNameList.length; i++) {
- if (this.HDeptNameList[i].閮ㄩ棬鍚嶇О == e) {
- this.hform.HDeptID = this.HDeptNameList[i].HItemID
- this.hform.HDeptName = this.HDeptNameList[i].閮ㄩ棬鍚嶇О
- }
- }
- },
- //鎿嶄綔鍛�
- getHEmpList() {
- uni.request({
- url: this.serverUrl + '/Web/GetEmployeeList_Json',
- data: {
- Employee: '',
- HGroupID: 0
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.HEmpNameList = res.data.data
- for (var i = 0; i < res.data.data.length; i++) {
- this.arrayHEmpName[i] = res.data.data[i].HName
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: '浜哄憳鏁版嵁璇锋眰澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //淇濈
- HKeeperNameChange(e) {
- for (var i = 0; i < this.HEmpNameList.length; i++) {
- if (this.HEmpNameList[i].HName == e) {
- console.log(this.HEmpNameList[i])
- this.hform.HKeeperID = this.HEmpNameList[i].HItemID
- this.hform.HKeeperName = this.HEmpNameList[i].HName
- }
- }
- },
- //楠屾敹
- HSecManagerNameChange(e) {
- for (var i = 0; i < this.HEmpNameList.length; i++) {
- if (this.HEmpNameList[i].HName == e) {
- this.hform.HSecManagerID = this.HEmpNameList[i].HItemID
- this.hform.HSecManagerName = this.HEmpNameList[i].HName
- }
- }
- },
- //閫変腑婧愬崟
- getHBarCodeData(HBarCode) {
- if (!this.hform.HFIFOWHName) {
- this.hform.HFIFOWHID = 0
- }
- uni.request({
- url: this.serverUrl + '/WEBSController/get_SourceBarCode_SellOut_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HSourceBillNo: HBarCode,
- HSourceBillType: this.hform.HMainSourceBillType,
- HMaker: this.hform.HMaker,
- HOWNERID: this.hform.HStockOrgID,
- HFIFOWhID: this.hform.HFIFOWHID,
- },
- success: (res) => {
- if (res.data.count == 1) {
- var data = res.data.data
- console.log(2, data);
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- this.hform.HSourceBillNo = data.hSourceBillNoField
- this.showHMainSourceBillType = false
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- this.tabs = 2
- this.showHSupName = false
- this.BarCodeFocus = true
- this.playSound(1)
- this.DisBillEntryList()
- } else {
- this.playSound(0)
- this.refreshHSourceBillState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- this.playSound(0)
- this.refreshHSourceBillState()
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //鎵潯鐮佸鐞�
- getCode(HBarCode) {
- //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
- if (!this.hform.HWHName) {
- this.hform.HWHID = 0
- }
- if (!this.hform.HStockPlaceName) {
- this.hform.HStockPlaceID = 0
- }
- var sOldBarCode = HBarCode
- var HDeleteFlag = sOldBarCode.substring(0, 1);
- var sBarCode = sOldBarCode.slice(1);
+ // this.getHYDList()
+ },
+ //婧愬崟璧勬枡
+ getHYDList() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetSourceBillList_Json',
+ data: {
+ HBillType: this.hform.HBillType,
+ HSourceBillType: this.hform.HMainSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ HSourceBillNo: "",
+ HMater: "",
+ HCustom: ""
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HSourceBillNoList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHSourceBillNo[i] = res.data.data[i].鍗曟嵁鍙�
+ }
+ this.reHSourceBillNo = false
+ this.$nextTick(() => {
+ this.reHSourceBillNo = true
+ })
+ } else {
+ uni.showToast({
+ title: '婧愬崟鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨浠撳簱
+ HWHNameChange(e) {
+ // var name = e.split("(")
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HWHID = this.HWHNameList[i].HItemID
- var sHWHID = this.hform.HWHID
- var sHSPID = this.hform.HStockPlaceID
- var sHQty = this.hform.HQty
- var sSourceBillNo = this.hform.HSourceBillNo
- var sSourceBillType = this.hform.HMainSourceBillType
- var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
- console.log(this.hform.HSourceBillNo, HSourceFlag)
- if (HDeleteFlag == "*") {
- if (sBarCode == "") {
- this.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: '璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�',
- icon: 'none'
- })
- } else {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBarCode: sBarCode
- },
- success: (res) => {
- console.log('鍒犻櫎鏉$爜', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.playSound(1)
- this.hform.HQty = ''
- this.DisBillEntryList()
- } else {
- this.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- this.playSound(0)
- this.refreshBarCodeState()
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- } else {
- var sBarCode = this.hform.HBarCode
- if (sHQty == "") {
- sHQty = 0;
- }
- uni.request({
- url: this.serverUrl + '/WEBSController/Get_BarCode_Json',
- data: {
- sBarCode: sBarCode,
- HInterID: this.hform.HInterID,
- HBillType: this.hform.HBillType,
- HBillNo: this.hform.HBillNo,
- HMaker: this.hform.HMaker,
- HWhID: sHWHID,
- HSPID: sHSPID,
- HQty: sHQty,
- HRedBlueFlag: this.hform.HRedBlueFlag,
- SourceFlag: HSourceFlag,
- HSourceBillNo: sSourceBillNo,
- HSourceBillType: sSourceBillType,
- HStockOrgID: this.hform.HStockOrgID,
- HScanStyle: "",
- HCustom1: "",
- HCustom2: ""
- },
- success: (res) => {
- console.log('鎵爜杩斿洖', res.data);
- this.hform.HBarCode = ''
- if (res.data.count == 1) {
- this.playSound(1)
- var data = res.data.data
- if (data.hBarTypeField == '浠撳簱鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = ''
- this.hform.HStockPlaceID = 0
- if (data.hSPFlagField == 0) {
- this.showHStockPlaceName = false
- } else {
- this.showHStockPlaceName = true
- }
- } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
- this.hform.HWHName = data.hWhNameField
- this.hform.HWHID = data.hWhIDField
- this.hform.HStockPlaceName = data.hSPNameField
- this.hform.HStockPlaceID = data.hSPIDField
- } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- this.hform.HDeptName = data.hDeptNameField
- this.hform.HDeptID = data.hDeptIDField
- this.tabs = 1
- } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
- this.hform.HSupName = data.hSupNameField
- this.hform.HSupID = data.hSupIDField
- if (data.hDeptIDField != 0) {
- this.hform.HDeptID = data.hDeptIDField
- this.hform.HDeptName = data.hDeptNameField
- }
- this.hform.HSourceBillNo = data.hSourceBillNoField
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- this.hform.HMainSourceBillType = data.hSourceBillTypeField
- if (data.hSourceBillTypeField == "1402") {
- this.HMainSourceBillType = '鍙戣揣閫氱煡鍗�'
- this.hform.HMainSourceBillType = 1402
- this.showHMainSourceBillType = false
- } else if (data.hSourceBillTypeField == "1401") {
- this.HMainSourceBillType = '閿�鍞鍗�'
- this.hform.HMainSourceBillType = 1401
- this.showHMainSourceBillType = false
- } else {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- }
- if (data.hMulSourceFlagField == 0) {
- this.showHSourceBillNo = false
- }
- //瀹㈡埛涓嶅彲缂栬緫
- this.showHSupName = false
- this.tabs = 2
- } else { //鐗╂枡鏉$爜
- this.tabs = 2
- if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
- }
- }
- //鏄剧ず琛ㄤ綋鏄庣粏
- this.DisBillEntryList()
- //娓呯┖鏁伴噺
- this.hform.HQty = ''
- } else {
- this.playSound(0)
- this.refreshBarCodeState()
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- this.playSound(0)
- this.refreshBarCodeState()
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- },
- //鐗╂枡淇℃伅
- DisBillEntryList() {
- uni.request({
- url: this.serverUrl + '/WEBSController/GetBillEntryTmpList_Json',
- data: {
- HInterID: this.hform.HInterID,
- HBillNo: this.hform.HBillNo,
- HBillType: this.hform.HBillType,
- HStockOrgID: this.hform.HStockOrgID
- },
- success: (res) => {
- console.log('鐗╂枡', res.data)
- if (res.data.count == 1) {
- var data = res.data.data
- this.Materlist = data.Materlist
- if (data.FIFOlist.length != 0) {
- if (data.FIFOlist[0].HMaterID != 0) {
- this.FIFOlist = data.FIFOlist
- }
- }
- if (!data.BarCodeDetailslist[0].HBarCode) {
- this.hform.HMaterName_B = ''
- this.hform.HMaterModel_B = ''
- this.hform.HBatchNo_B = ''
- this.hform.HUnitName_B = ''
- this.hform.HQty_B = ''
- this.hform.HTMQty_B = ''
- this.hform.HWHName_B = ''
- this.hform.HSPName_B = ''
- } else {
- this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName
- this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel
- this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo
- this.hform.HUnitName_B = data.BarCodeDetailslist[0].HUnitName
- this.hform.HQty_B = data.BarCodeDetailslist[0].HQty
- this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty
- this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName
- this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName
- }
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //鍒犻櫎鐗╂枡鐮�
- delMater(item) {
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕佸垹闄� " ' + item.鐗╂枡鍚嶇О + ' " 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
- success: (res) => {
- if (res.confirm) {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json',
- data: {
- HInterID: this.hform.HInterID,
- HMaterID: item.HMaterID,
- HAuxPropID: item.HAuxPropID,
- HMTONo: item.HMTONo,
- HSourceInterID: item.HSourceInterID,
- HSourceEntryID: item.HSourceEntryID,
- HBillType: this.hform.HBillType
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.DisBillEntryList()
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- }
- });
- },
- //鏂板
- getNewData() {
- uni.request({
- url: this.serverUrl + '/WEBSController/GetMaxBillNoAndID_Json',
- data: {
- HBillType: this.hform.HBillType
- },
- success: (res) => {
- // console.log(res.data)
- if (res.data.count == 1) {
- this.hform.HInterID = res.data.data[0].HInterID
- this.hform.HBillNo = res.data.data[0].HBillNo
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- //淇敼鍥炲~鏁版嵁
- RoadBillMain(HInterID) {
- uni.request({
- url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json',
- data: {
- HInterID: HInterID,
- HBillType: this.hform.HBillType
- },
- success: (res) => {
- console.log(33, res.data.data[0]);
- if (res.data.count == 1) {
- var data = res.data.data[0]
- this.hform.HInterID = data.HInterID
- this.hform.HBillNo = data.HBillNo
- this.hform.HMainSourceBillType = data.HSourceBillType
- this.hform.HSourceBillNo = data.HSourceBillNo
- if (data.HSourceBillType == 1402) {
- this.hform.HMainSourceBillType = 1402
- this.HMainSourceBillType = '鍙戣揣閫氱煡鍗�'
- this.showHSupName = false
- } else if (data.HSourceBillType == 1401) {
- this.hform.HMainSourceBillType = 1401
- this.HMainSourceBillType = '閿�鍞鍗�'
- this.showHSupName = false
- } else {
- this.hform.HMainSourceBillType = -1
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- }
- this.showHMainSourceBillType = false
+ console.log(this.HWHNameList[i]['鍚敤浠撲綅'])
- //闈炲婧愬崟妯″紡
- if (data.HMulSourceBill == 0) {
- this.showHSourceBillNo = false
- }
- this.hform.HDeptID = data.HDeptID
- this.hform.HDeptName = data.HDeptName
- this.hform.HSupID = data.HCusID
- this.hform.HSupName = data.HCusName
- this.DisBillEntryList()
- this.tabs = 2
- } else {
- uni.showToast({
- title: '鑾峰彇鏁版嵁鍥炲~澶辫触',
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- },
- addNew() {
- uni.redirectTo({
- url: '/pages/xiaoshouchuku/form?OperationType=1'
- })
- },
- submit() {
- //浠撳簱銆佷粨浣嶃�佷繚绠°�侀獙鏀躲�侀儴闂ㄣ�佸鎴锋枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
- if (!this.hform.HWHName) {
- this.hform.HWHID = 0
- }
- if (!this.hform.HStockPlaceName) {
- this.hform.HStockPlaceID = 0
- }
- if (!this.hform.HKeeperName) {
- this.hform.HKeeperID = 0
- }
- if (!this.hform.HSecManagerName) {
- this.hform.HSecManagerID = 0
- }
- if (!this.hform.HDeptName) {
- this.hform.HDeptID = 0
- }
- if (!this.hform.HSupName) {
- this.hform.HSupID = 0
- }
- if (this.hform.HInterID == 0 || !this.hform.HInterID) {
- uni.showToast({
- title: '鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�',
- icon: 'none'
- })
- } else if (!this.hform.HBillNo) {
- uni.showToast({
- title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�',
- icon: 'none'
- })
- } else if (!this.Materlist || this.Materlist.length == 0) {
- uni.showToast({
- title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
- icon: 'none'
- })
- } else {
- var s = 0;
- for (var i = 0; i < this.Materlist.length; i++) {
- if (this.Materlist[i].鏁伴噺 > 0) {
- s = 1;
- }
- }
- if (s == 0) {
- uni.showToast({
- title: '娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
- icon: 'none'
- })
- } else {
- uni.showLoading({
- title: '璇风◢鍊�'
- })
- var sMainStr = JSON.stringify(this.hform);
- uni.request({
- url: this.serverUrl + '/WEBSController/set_SaveSellOutBill_Json',
- method: 'POST',
- dataType: "json",
- data: {
- oMain: sMainStr
- },
- success: (res) => {
- console.log(1, res);
- uni.hideLoading()
- if (res.data.count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/xiaoshouchuku/form?OperationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 500)
- }
- }
- });
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
- }
- },
+ if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
+ this.showHStockPlaceName = true
+ } else {
+ this.hform.HStockPlaceName = ''
+ this.showHStockPlaceName = false
+ }
+ }
+ }
+ },
+ HFIFOWHNameChange(e) {
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i].浠撳簱鍚嶇О == e) {
+ this.hform.HFIFOWHName = this.HWHNameList[i].浠撳簱鍚嶇О
+ this.hform.HFIFOWHID = this.HWHNameList[i].HItemID
+ }
+ }
+ },
+ //閫夋嫨浠撲綅
+ HStockPlaceNameChange(e) {
+ for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
+ if (this.HStockPlaceNameList[i].浠撲綅鍚嶇О == e) {
+ this.hform.HStockPlaceName = this.HStockPlaceNameList[i].浠撲綅鍚嶇О
+ this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID
+ }
+ }
+ },
+ //閫夋嫨婧愬崟
+ HSourceBillNoChange(e) {
+ this.hform.HSourceBillNo = e
+ this.getHBarCodeData(e)
+ // for(var i=0;i<this.HSourceBillNoList.length;i++){
+ // if(this.HSourceBillNoList[i].鍗曟嵁鍙� == e){
+ // this.hform.HSourceBillNo = this.HSourceBillNoList[i].鍗曟嵁鍙�
+ // }
+ // }
+ },
+ //閫夋嫨婧愬崟绫诲瀷
+ HMainSourceBillTypeChange(e) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value]
+ if (this.HMainSourceBillType == '鍙戣揣閫氱煡鍗�') {
+ this.hform.HMainSourceBillType = 1402
+ // this.getHYDList()
+ } else if (this.HMainSourceBillType == '閿�鍞鍗�') {
+ this.hform.HMainSourceBillType = 1401
+ // this.getHYDList()
+ } else {
+ this.hform.HMainSourceBillType = -1
+ // this.getHYDList()
+ }
+ },
- goBack() {
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: '/pages/xiaoshouchuku/table'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- }
- }
- });
- }
- }
- }
+ //鑾峰彇瀹㈡埛鏁版嵁
+ getHSupList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Customer/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HSupNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHSupName[i] = res.data.data[i].瀹㈡埛鍚嶇О
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '瀹㈡埛鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨瀹㈡埛
+ HSupNameChange(e) {
+ for (var i = 0; i < this.HSupNameList.length; i++) {
+ if (this.HSupNameList[i].瀹㈡埛鍚嶇О == e) {
+ this.hform.HSupID = this.HSupNameList[i].HItemID
+ this.hform.HSupName = this.HSupNameList[i].瀹㈡埛鍚嶇О
+ }
+ }
+ },
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ getHDeptList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Department/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HDeptNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHDeptName[i] = res.data.data[i].閮ㄩ棬鍚嶇О
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '閮ㄩ棬鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨浣跨敤閮ㄩ棬
+ HDeptNameChange(e) {
+ for (var i = 0; i < this.HDeptNameList.length; i++) {
+ if (this.HDeptNameList[i].閮ㄩ棬鍚嶇О == e) {
+ this.hform.HDeptID = this.HDeptNameList[i].HItemID
+ this.hform.HDeptName = this.HDeptNameList[i].閮ㄩ棬鍚嶇О
+ }
+ }
+ },
+ //鎿嶄綔鍛�
+ getHEmpList() {
+ uni.request({
+ url: this.serverUrl + '/Web/GetEmployeeList_Json',
+ data: {
+ Employee: '',
+ HGroupID: 0
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HEmpNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHEmpName[i] = res.data.data[i].HName
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '浜哄憳鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //淇濈
+ HKeeperNameChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ console.log(this.HEmpNameList[i])
+ this.hform.HKeeperID = this.HEmpNameList[i].HItemID
+ this.hform.HKeeperName = this.HEmpNameList[i].HName
+ }
+ }
+ },
+ //楠屾敹
+ HSecManagerNameChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ this.hform.HSecManagerID = this.HEmpNameList[i].HItemID
+ this.hform.HSecManagerName = this.HEmpNameList[i].HName
+ }
+ }
+ },
+ //閫変腑婧愬崟
+ getHBarCodeData(HBarCode) {
+ if (!this.hform.HFIFOWHName) {
+ this.hform.HFIFOWHID = 0
+ }
+ uni.request({
+ url: this.serverUrl + '/WEBSController/get_SourceBarCode_SellOut_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HSourceBillNo: HBarCode,
+ HSourceBillType: this.hform.HMainSourceBillType,
+ HMaker: this.hform.HMaker,
+ HOWNERID: this.hform.HStockOrgID,
+ HFIFOWhID: this.hform.HFIFOWHID,
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ var data = res.data.data
+ console.log(2, data);
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ this.showHMainSourceBillType = false
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ this.tabs = 2
+ this.showHSupName = false
+ this.BarCodeFocus = true
+ this.playSound(1)
+ this.DisBillEntryList()
+ } else {
+ this.playSound(0)
+ this.refreshHSourceBillState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshHSourceBillState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //鎵潯鐮佸鐞�
+ getCode(HBarCode) {
+ //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ var sOldBarCode = HBarCode
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+
+ var sHWHID = this.hform.HWHID
+ var sHSPID = this.hform.HStockPlaceID
+ var sHQty = this.hform.HQty
+ var sSourceBillNo = this.hform.HSourceBillNo
+ var sSourceBillType = this.hform.HMainSourceBillType
+ var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true
+ console.log(this.hform.HSourceBillNo, HSourceFlag)
+ if (HDeleteFlag == "*") {
+ if (sBarCode == "") {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: '璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�',
+ icon: 'none'
+ })
+ } else {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ success: (res) => {
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.playSound(1)
+ this.hform.HQty = ''
+ this.DisBillEntryList()
+ } else {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ } else {
+ var sBarCode = this.hform.HBarCode
+ if (sHQty == "") {
+ sHQty = 0;
+ }
+ uni.request({
+ url: this.serverUrl + '/WEBSController/Get_BarCode_Json',
+ data: {
+ sBarCode: sBarCode,
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HQty: sHQty,
+ HRedBlueFlag: this.hform.HRedBlueFlag,
+ SourceFlag: HSourceFlag,
+ HSourceBillNo: sSourceBillNo,
+ HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ HScanStyle: "",
+ HCustom1: "",
+ HCustom2: ""
+ },
+ success: (res) => {
+ console.log('鎵爜杩斿洖', res.data);
+ this.hform.HBarCode = ''
+ if (res.data.count == 1) {
+ this.playSound(1)
+ var data = res.data.data
+ if (data.hBarTypeField == '浠撳簱鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = ''
+ this.hform.HStockPlaceID = 0
+ if (data.hSPFlagField == 0) {
+ this.showHStockPlaceName = false
+ } else {
+ this.showHStockPlaceName = true
+ }
+ } else if (data.hBarTypeField == '浠撲綅鏉$爜') {
+ this.hform.HWHName = data.hWhNameField
+ this.hform.HWHID = data.hWhIDField
+ this.hform.HStockPlaceName = data.hSPNameField
+ this.hform.HStockPlaceID = data.hSPIDField
+ } else if (data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ this.hform.HDeptName = data.hDeptNameField
+ this.hform.HDeptID = data.hDeptIDField
+ this.tabs = 1
+ } else if (data.hBarTypeField == '婧愬崟鏉$爜') {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ if (data.hSourceBillTypeField == "1402") {
+ this.HMainSourceBillType = '鍙戣揣閫氱煡鍗�'
+ this.hform.HMainSourceBillType = 1402
+ this.showHMainSourceBillType = false
+ } else if (data.hSourceBillTypeField == "1401") {
+ this.HMainSourceBillType = '閿�鍞鍗�'
+ this.hform.HMainSourceBillType = 1401
+ this.showHMainSourceBillType = false
+ } else {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ this.showHMainSourceBillType = false
+ }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //瀹㈡埛涓嶅彲缂栬緫
+ this.showHSupName = false
+ this.tabs = 2
+ } else { //鐗╂枡鏉$爜
+ this.materMeta.push(data)
+ this.tabs = 2
+ if (!this.hform.HSourceBillNo) {
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
+ }
+ }
+ //鏄剧ず琛ㄤ綋鏄庣粏
+ this.DisBillEntryList()
+ //娓呯┖鏁伴噺
+ this.hform.HQty = ''
+ } else {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ this.playSound(0)
+ this.refreshBarCodeState()
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ },
+ //鐗╂枡淇℃伅
+ DisBillEntryList() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetBillEntryTmpList_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ success: (res) => {
+ console.log('鐗╂枡', res.data)
+ if (res.data.count == 1) {
+ var data = res.data.data
+ this.materMeta = data.BarCodeDetailslist
+ this.Materlist = data.Materlist
+ if (data.FIFOlist.length != 0) {
+ if (data.FIFOlist[0].HMaterID != 0) {
+ this.FIFOlist = data.FIFOlist
+ }
+ }
+ if (!data.BarCodeDetailslist[0].HBarCode) {
+ this.hform.HMaterName_B = ''
+ this.hform.HMaterModel_B = ''
+ this.hform.HBatchNo_B = ''
+ this.hform.HUnitName_B = ''
+ this.hform.HQty_B = ''
+ this.hform.HTMQty_B = ''
+ this.hform.HWHName_B = ''
+ this.hform.HSPName_B = ''
+ } else {
+ this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName
+ this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel
+ this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo
+ this.hform.HUnitName_B = data.BarCodeDetailslist[0].HUnitName
+ this.hform.HQty_B = data.BarCodeDetailslist[0].HQty
+ this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty
+ this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName
+ this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName
+ }
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //鍒犻櫎鐗╂枡鐮�
+ delMater(item) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄� " ' + item.鐗╂枡鍚嶇О + ' " 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
+ success: (res) => {
+ if (res.confirm) {
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HMaterID: item.HMaterID,
+ HAuxPropID: item.HAuxPropID,
+ HMTONo: item.HMTONo,
+ HSourceInterID: item.HSourceInterID,
+ HSourceEntryID: item.HSourceEntryID,
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.DisBillEntryList()
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ }
+ });
+ },
+ //鏂板
+ getNewData() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetMaxBillNoAndID_Json',
+ data: {
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ // console.log(res.data)
+ if (res.data.count == 1) {
+ this.hform.HInterID = res.data.data[0].HInterID
+ this.hform.HBillNo = res.data.data[0].HBillNo
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ //淇敼鍥炲~鏁版嵁
+ RoadBillMain(HInterID) {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json',
+ data: {
+ HInterID: HInterID,
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ console.log(33, res.data.data[0]);
+ if (res.data.count == 1) {
+ var data = res.data.data[0]
+ this.hform.HInterID = data.HInterID
+ this.hform.HBillNo = data.HBillNo
+ this.hform.HMainSourceBillType = data.HSourceBillType
+ this.hform.HSourceBillNo = data.HSourceBillNo
+ if (data.HSourceBillType == 1402) {
+ this.hform.HMainSourceBillType = 1402
+ this.HMainSourceBillType = '鍙戣揣閫氱煡鍗�'
+ this.showHSupName = false
+ } else if (data.HSourceBillType == 1401) {
+ this.hform.HMainSourceBillType = 1401
+ this.HMainSourceBillType = '閿�鍞鍗�'
+ this.showHSupName = false
+ } else {
+ this.hform.HMainSourceBillType = -1
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ }
+ this.showHMainSourceBillType = false
+
+ //闈炲婧愬崟妯″紡
+ if (data.HMulSourceBill == 0) {
+ this.showHSourceBillNo = false
+ }
+ this.hform.HDeptID = data.HDeptID
+ this.hform.HDeptName = data.HDeptName
+ this.hform.HSupID = data.HCusID
+ this.hform.HSupName = data.HCusName
+ this.DisBillEntryList()
+ this.tabs = 2
+ } else {
+ uni.showToast({
+ title: '鑾峰彇鏁版嵁鍥炲~澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ addNew() {
+ uni.redirectTo({
+ url: '/pages/xiaoshouchuku/form?OperationType=1'
+ })
+ },
+ submit() {
+ //浠撳簱銆佷粨浣嶃�佷繚绠°�侀獙鏀躲�侀儴闂ㄣ�佸鎴锋枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ if (!this.hform.HKeeperName) {
+ this.hform.HKeeperID = 0
+ }
+ if (!this.hform.HSecManagerName) {
+ this.hform.HSecManagerID = 0
+ }
+ if (!this.hform.HDeptName) {
+ this.hform.HDeptID = 0
+ }
+ if (!this.hform.HSupName) {
+ this.hform.HSupID = 0
+ }
+ if (this.hform.HInterID == 0 || !this.hform.HInterID) {
+ uni.showToast({
+ title: '鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�',
+ icon: 'none'
+ })
+ } else if (!this.hform.HBillNo) {
+ uni.showToast({
+ title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�',
+ icon: 'none'
+ })
+ } else if (!this.Materlist || this.Materlist.length == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ var s = 0;
+ for (var i = 0; i < this.Materlist.length; i++) {
+ if (this.Materlist[i].鏁伴噺 > 0) {
+ s = 1;
+ }
+ }
+ if (s == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵弿鐗╂枡鏉$爜锛岃鍏堟壂鎻忕墿鏂欐潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ uni.showLoading({
+ title: '璇风◢鍊�'
+ })
+ var sMainStr = JSON.stringify(this.hform);
+ uni.request({
+ url: this.serverUrl + '/WEBSController/set_SaveSellOutBill_Json',
+ method: 'POST',
+ dataType: "json",
+ data: {
+ oMain: sMainStr
+ },
+ success: async (res) => {
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ let sMain = JSON.stringify(this.materMeta) + ';' + this.hform.HBillType + ';' + this.hform.HBillNo
+ try {
+ await this.Set_BarCodeBill(sMain)
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/xiaoshouchuku/form?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } catch(e) {
+ uni.showToast({
+ title: e,
+ icon: 'none'
+ })
+ }
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+ }
+ },
+ Set_BarCodeBill(sMain) {
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ method: 'POST',
+ url: 'Sc_BarCode/Set_BarCodeBill',
+ data: {
+ msg: sMain
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ resolve()
+ } else {
+ reject(Message)
+ }
+ }
+ })
+ })
+ },
+ goBack() {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/xiaoshouchuku/table'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
- .form {
- width: 668rpx;
- margin: 20rpx auto;
- padding-bottom: 240rpx;
- }
+ .form {
+ width: 668rpx;
+ margin: 20rpx auto;
+ padding-bottom: 240rpx;
+ }
- .tab_area {
- width: 100%;
- height: 50rpx;
- }
+ .tab_area {
+ width: 100%;
+ height: 50rpx;
+ }
- .other {
- margin-top: 8rpx;
- text-align: center;
- font-size: 28rpx;
- padding: 4rpx 18rpx;
- color: #1890FF;
- }
+ .other {
+ margin-top: 8rpx;
+ text-align: center;
+ font-size: 28rpx;
+ padding: 4rpx 18rpx;
+ color: #1890FF;
+ }
- .tabs {
- width: 100%;
- display: flex;
- border-bottom: 1px solid #ddd;
- margin: 20rpx 0;
+ .tabs {
+ width: 100%;
+ display: flex;
+ border-bottom: 1px solid #ddd;
+ margin: 20rpx 0;
- view {
- width: 25%;
- font-size: 30rpx;
- color: #555;
- text-align: center;
- padding: 16rpx 0;
- }
+ view {
+ width: 25%;
+ font-size: 30rpx;
+ color: #555;
+ text-align: center;
+ padding: 16rpx 0;
+ }
- .on {
- color: #3a78ff;
- font-weight: bold;
- border-bottom: 3px solid #3a78ff;
- }
- }
+ .on {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
- .form-item {
- display: flex;
- align-items: center;
- font-size: 30rpx;
- padding: 6rpx 0;
- gap: 12rpx;
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ padding: 6rpx 0;
+ gap: 12rpx;
- .title {
- width: 208rpx;
+ .title {
+ width: 208rpx;
- text {
- color: red;
- font-weight: bold;
- }
- }
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
- .right {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #acacac;
- position: relative;
- display: flex;
-
- picker {
- width: 100%;
- }
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ position: relative;
+ display: flex;
- .uni-combox {
- width: 100%;
- }
- }
+ picker {
+ width: 100%;
+ }
- .righton {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #e4e4e4;
- background-color: #e4e4e4;
- }
+ .uni-combox {
+ width: 100%;
+ }
+ }
- input {
- width: 100%;
- padding: 8rpx 20rpx;
- font-size: 30rpx;
- }
+ .righton {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
- textarea {
- width: 98%;
- padding: 8rpx 20rpx;
- font-size: 30rpx;
- }
+ input {
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
- }
+ textarea {
+ width: 98%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
- .bottom-btn {
- width: 100%;
- box-sizing: border-box;
- // height: 120rpx;
- position: fixed;
- bottom: 0;
- left: 0;
- background-color: #fff;
- box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
- padding: 30rpx 40rpx 40rpx 40rpx;
- display: flex;
- flex-direction: row;
- gap: 10rpx;
+ }
- button {
- border-radius: 50rpx;
- width: 180rpx;
- height: 66rpx;
- line-height: 66rpx;
- font-size: 28rpx;
- }
+ .bottom-btn {
+ width: 100%;
+ box-sizing: border-box;
+ // height: 120rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
- .btn-a {
- background-color: #3A78FF;
- color: #fff;
- }
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
- .btn-b {
- background-color: #41a863;
- color: #fff;
- }
+ .btn-a {
+ background-color: #3A78FF;
+ color: #fff;
+ }
- .btn-c {
- background-color: #acacac;
- color: #fff;
- // position: absolute;
- // right: 120rpx;
- }
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
- .btn-d {
- background-color: #ff8901;
- color: #fff;
- }
- }
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ // position: absolute;
+ // right: 120rpx;
+ }
- .list {
- width: 100%;
+ .btn-d {
+ background-color: #ff8901;
+ color: #fff;
+ }
+ }
- .card-detail {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- line-height: 120%;
+ .list {
+ width: 100%;
- .detail {
- // width: 50%;
- font-size: 26rpx;
- margin-bottom: 12rpx;
- color: #555;
- margin-right: 20rpx;
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
- text {
- color: #999;
- font-size: 26rpx;
- }
- }
- }
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
- .more {
- color: #888;
- font-size: 24rpx;
- display: flex;
- border-top: 1px solid #eee;
- padding-top: 20rpx;
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
- .part {
- width: 50%;
- text-align: center;
- }
- }
- }
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
- .icon-wrapper {
- background-color: #3A78FF;
- border-radius: 100%;
- width: 52rpx;
- height: 52rpx;
- display: flex;
- justify-content: center;
- align-items: center;
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+ }
- .uni-icons {
- color: #fff !important;
- }
- }
+ .icon-wrapper {
+ background-color: #3A78FF;
+ border-radius: 100%;
+ width: 52rpx;
+ height: 52rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
- .icon-wrapper[disabled] {
- background-color: rgba(228, 228, 228, 1);
- pointer-events: none;
- touch-action: none;
- }
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .icon-wrapper[disabled] {
+ background-color: rgba(228, 228, 228, 1);
+ pointer-events: none;
+ touch-action: none;
+ }
</style>
\ No newline at end of file
diff --git a/pages/xiaoshoutuihuo/form.vue b/pages/xiaoshoutuihuo/form.vue
index d1ae8a2..d2651a9 100644
--- a/pages/xiaoshoutuihuo/form.vue
+++ b/pages/xiaoshoutuihuo/form.vue
@@ -916,10 +916,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
diff --git a/pages/zhijiediaobo/form.vue b/pages/zhijiediaobo/form.vue
index 5c8deb2..0cca60c 100644
--- a/pages/zhijiediaobo/form.vue
+++ b/pages/zhijiediaobo/form.vue
@@ -1477,7 +1477,7 @@
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
this.hform.HMainSourceBillType = data.hSourceBillTypeField
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
.hSourceBillTypeField)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
@@ -1530,10 +1530,42 @@
} else { //鐗╂枡鏉$爜
this.tabs = 2
if (!this.hform.HSourceBillNo) {
- this.HMainSourceBillType = '鎵嬪伐褰曞叆'
- this.hform.HMainSourceBillType = -1
- this.showHMainSourceBillType = false
- this.showHSourceBillNo = false
+ this.hform.HSupName = data.hSupNameField
+ this.hform.HSupID = data.hSupIDField
+ this.hform.HSourceBillNo = data.hSourceBillNoField
+ if (data.hDeptIDField != 0) {
+ this.hform.HDeptID = data.hDeptIDField
+ this.hform.HDeptName = data.hDeptNameField
+ }
+ console.log(data)
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data
+ .hSourceBillTypeField)
+ if (index != -1) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
+ this.hform.HMainSourceBillType = data.hSourceBillTypeField
+ this.showHMainSourceBillType = false
+ }
+ // if (data.hSourceBillTypeField == "1103") {
+ // this.HMainSourceBillType = '鏀舵枡閫氱煡鍗�'
+ // this.hform.HMainSourceBillType = 1103
+ // this.showHMainSourceBillType = false
+ // } else if (data.hSourceBillTypeField == "1102") {
+ // this.HMainSourceBillType = '閲囪喘璁㈠崟'
+ // this.hform.HMainSourceBillType = 1102
+ // this.showHMainSourceBillType = false
+ // } else {
+ // this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ // this.hform.HMainSourceBillType = -1
+ // this.showHMainSourceBillType = false
+ // }
+ if (data.hMulSourceFlagField == 0) {
+ this.showHSourceBillNo = false
+ }
+ //渚涘簲鍟嗕笉鍙紪杈�
+ this.showHSupName = false
}
}
//鏄剧ず琛ㄤ綋鏄庣粏
@@ -1716,7 +1748,7 @@
this.hform.HMainSourceBillType = data.HSourceBillType
this.hform.HSourceBillNo = data.HSourceBillNo
- let index = this.arrayHMainSourceBillValue.findIndex(e => e = data.HSourceBillType)
+ let index = this.arrayHMainSourceBillValue.findIndex(e => e == data.HSourceBillType)
if (index != -1) {
this.HMainSourceBillType = this.arrayHMainSourceBillType[index]
this.hform.HMainSourceBillType = data.HSourceBillType
diff --git a/utils/common.js b/utils/common.js
index 09e4494..87f3b4e 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -277,7 +277,7 @@
}
},
- complete() {
+ complete: () => {
setTimeout(() => {
uni.hideLoading()
if (errorTip != null) {
@@ -303,6 +303,13 @@
}
innerAudioContext.play(); // 鎾斁闊抽
}
+
+ replaceWithFunction(str, handler) {
+ return str.replace(/\{(.+?)\}/g, (match, key) => {
+ // 璋冪敤澶勭悊鍑芥暟锛屼紶鍏ュ尮閰嶅埌鐨勯敭
+ return handler(key, match);
+ });
+ }
}
export const CommonUtils = new commonUtils()
\ No newline at end of file
--
Gitblit v1.9.1