change
This commit is contained in:
@@ -51,8 +51,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-18 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_confirmMore">确认损益</button>
|
<button class="zd-col-18 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="handleSubmit">确认损益</button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 放置弹窗组件(用户名密码) -->
|
||||||
|
<CredentialPopup ref="credentialPopup" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -78,6 +80,21 @@
|
|||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async handleSubmit() {
|
||||||
|
if (!this.dataList.length) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// 显示弹窗,等待用户输入
|
||||||
|
const { username, password } = await this.$refs.credentialPopup.show();
|
||||||
|
// 调用原接口,传入账号密码
|
||||||
|
this._confirmMore(username, password);
|
||||||
|
} catch (error) {
|
||||||
|
// 用户取消,不做处理
|
||||||
|
console.log('用户取消输入');
|
||||||
|
}
|
||||||
|
},
|
||||||
handleBlur (e) {
|
handleBlur (e) {
|
||||||
if (e.change_qty) {
|
if (e.change_qty) {
|
||||||
if (e.change_qty < 0) {
|
if (e.change_qty < 0) {
|
||||||
@@ -115,14 +132,10 @@
|
|||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _confirmMore () {
|
async _confirmMore (username, password) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.dataList.length) {
|
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
let res = await confirmMore(this.dataList)
|
let res = await confirmMore(username, password, this.dataList)
|
||||||
if (res) {
|
if (res) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -64,8 +64,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_confirmPalletAssembly">确认组盘</button>
|
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="handleSubmit">确认组盘</button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 放置弹窗组件(用户名密码) -->
|
||||||
|
<CredentialPopup ref="credentialPopup" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -94,6 +96,21 @@
|
|||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async handleSubmit() {
|
||||||
|
if (!this.val1 || !this.dataList.length) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// 显示弹窗,等待用户输入
|
||||||
|
const { username, password } = await this.$refs.credentialPopup.show();
|
||||||
|
// 调用原接口,传入账号密码
|
||||||
|
this._confirmPalletAssembly(username, password);
|
||||||
|
} catch (error) {
|
||||||
|
// 用户取消,不做处理
|
||||||
|
console.log('用户取消输入');
|
||||||
|
}
|
||||||
|
},
|
||||||
toScanAdd () {
|
toScanAdd () {
|
||||||
if (this.bagCode) {
|
if (this.bagCode) {
|
||||||
this._getBagAssembly2(this.bagCode)
|
this._getBagAssembly2(this.bagCode)
|
||||||
@@ -157,14 +174,10 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _confirmPalletAssembly () {
|
async _confirmPalletAssembly (username, password) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.dataList.length) {
|
|
||||||
this.disabled = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
let res = await confirmPalletAssembly(this.val1, this.dataList)
|
let res = await confirmPalletAssembly(username, password, this.val1, this.dataList)
|
||||||
if (res) {
|
if (res) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -172,9 +172,9 @@ export const getBagAssembly = (bno) => request({
|
|||||||
data: {bag_no: bno}
|
data: {bag_no: bno}
|
||||||
})
|
})
|
||||||
// 组盘
|
// 组盘
|
||||||
export const confirmPalletAssembly = (vcode, arr) => request({
|
export const confirmPalletAssembly = (username, password, vcode, arr) => request({
|
||||||
url:'api/pdaCommon/confirmPalletAssembly',
|
url:'api/pdaCommon/confirmPalletAssembly',
|
||||||
data: {vehicle_code: vcode, group_plates: arr}
|
data: {username: username, password: RSAencrypt(password), vehicle_code: vcode, group_plates: arr}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 物料组桶(组盘管理)共 (1) 个
|
// 物料组桶(组盘管理)共 (1) 个
|
||||||
@@ -268,9 +268,9 @@ export const queryMoreIvt = (vcode) => request({
|
|||||||
data: {vehicle_code: vcode}
|
data: {vehicle_code: vcode}
|
||||||
})
|
})
|
||||||
// 确认损益
|
// 确认损益
|
||||||
export const confirmMore = (rows) => request({
|
export const confirmMore = (username, password, rows) => request({
|
||||||
url:'api/pdaWarehouse/confirmMore',
|
url:'api/pdaWarehouse/confirmMore',
|
||||||
data: {rows: rows}
|
data: {username: username, password: RSAencrypt(password), rows: rows}
|
||||||
})
|
})
|
||||||
|
|
||||||
// 虚拟入库(仓储管理)共 (1) 个
|
// 虚拟入库(仓储管理)共 (1) 个
|
||||||
|
|||||||
Reference in New Issue
Block a user