组袋组桶
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZdPrint">组袋并打印</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBagAssembly">确认组袋</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="handleSubmit">确认组袋</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="tolPrint">标签打印</button>
|
||||
</view>
|
||||
<!-- 自定义弹窗 -->
|
||||
@@ -148,6 +148,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 放置弹窗组件(用户名密码) -->
|
||||
<CredentialPopup ref="credentialPopup" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -208,6 +210,21 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async handleSubmit() {
|
||||
if (this.flag || !this.val1 || !this.num || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
// 显示弹窗,等待用户输入
|
||||
const { username, password } = await this.$refs.credentialPopup.show();
|
||||
// 调用原接口,传入账号密码
|
||||
this._confirmBagAssembly(username, password);
|
||||
} catch (error) {
|
||||
// 用户取消,不做处理
|
||||
console.log('用户取消输入');
|
||||
}
|
||||
},
|
||||
// 显示弹窗(重置表单)
|
||||
showDialog() {
|
||||
this.resetForm();
|
||||
@@ -317,14 +334,10 @@
|
||||
this._confirmBagAssembly()
|
||||
this.labelPrint()
|
||||
},
|
||||
async _confirmBagAssembly () {
|
||||
async _confirmBagAssembly (username, password) {
|
||||
this.disabled = true
|
||||
if (this.flag || !this.val1 || !this.num || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmBagAssembly(this.val1, this.materialData.material_id, this.materialData.supp_code, this.num, this.pcsn, this.date)
|
||||
let res = await confirmBagAssembly(username, password, this.val1, this.materialData.material_id, this.materialData.supp_code, this.num, this.pcsn, this.date)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
@@ -559,116 +572,6 @@
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus">
|
||||
// .input-container {
|
||||
// background-color: #fff;
|
||||
// border-radius: 16rpx;
|
||||
// padding: 30rpx;
|
||||
// box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
// margin-bottom: 40rpx;
|
||||
// }
|
||||
|
||||
// .input-wrapper {
|
||||
// position: relative;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// // border: 2rpx solid #e0e0e0;
|
||||
// border-radius: 12rpx;
|
||||
// overflow: hidden;
|
||||
// transition: border-color 0.3s;
|
||||
// }
|
||||
|
||||
// .input-wrapper:focus-within {
|
||||
// border-color: #007AFF;
|
||||
// }
|
||||
|
||||
// .input-field {
|
||||
// flex: 1;
|
||||
// height: 80rpx;
|
||||
// // padding: 0 24rpx;
|
||||
// font-size: 28rpx;
|
||||
// color: #333;
|
||||
// }
|
||||
|
||||
// .placeholder {
|
||||
// color: #999;
|
||||
// font-size: 28rpx;
|
||||
// }
|
||||
|
||||
// .picker {
|
||||
// width: 80rpx;
|
||||
// height: 80rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// background-color: #f8f8f8;
|
||||
// border-left: 2rpx solid #e0e0e0;
|
||||
// }
|
||||
|
||||
// .picker-trigger {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// }
|
||||
|
||||
// .picker-text {
|
||||
// font-size: 24rpx;
|
||||
// color: #666;
|
||||
// }
|
||||
|
||||
// .custom-dialog-mask {
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// bottom: 0;
|
||||
// background: rgba(0, 0, 0, 0.5);
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// z-index: 999;
|
||||
// }
|
||||
|
||||
// .custom-dialog {
|
||||
// width: 600rpx;
|
||||
// background: #fff;
|
||||
// border-radius: 16rpx;
|
||||
// overflow: hidden;
|
||||
// }
|
||||
|
||||
// .dialog-title {
|
||||
// padding: 30rpx;
|
||||
// font-size: 32rpx;
|
||||
// text-align: center;
|
||||
// border-bottom: 1rpx solid #eee;
|
||||
// }
|
||||
|
||||
// .dialog-body {
|
||||
// padding: 40rpx;
|
||||
// }
|
||||
|
||||
// .dialog-input {
|
||||
// width: 100%;
|
||||
// height: 80rpx;
|
||||
// border: 1rpx solid #ddd;
|
||||
// border-radius: 8rpx;
|
||||
// padding: 0 20rpx;
|
||||
// text-align: center;
|
||||
// }
|
||||
|
||||
// .dialog-footer {
|
||||
// display: flex;
|
||||
// border-top: 1rpx solid #eee;
|
||||
// }
|
||||
|
||||
// .dialog-footer button {
|
||||
// flex: 1;
|
||||
// border-radius: 0;
|
||||
// margin: 0;
|
||||
// }
|
||||
|
||||
|
||||
/* 遮罩层 */
|
||||
.dialog-mask {
|
||||
position: fixed;
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZtPrint">组桶并打印</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBucketAssembly">确认组桶</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="handleSubmit">确认组桶</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="tolPrint">标签打印</button>
|
||||
</view>
|
||||
<!-- 自定义弹窗 -->
|
||||
@@ -120,6 +120,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 放置弹窗组件(用户名密码) -->
|
||||
<CredentialPopup ref="credentialPopup" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -169,6 +171,21 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async handleSubmit() {
|
||||
if (this.flag || !this.val1 || !this.weight || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
// 显示弹窗,等待用户输入
|
||||
const { username, password } = await this.$refs.credentialPopup.show();
|
||||
// 调用原接口,传入账号密码
|
||||
this._confirmBucketAssembly(username, password);
|
||||
} catch (error) {
|
||||
// 用户取消,不做处理
|
||||
console.log('用户取消输入');
|
||||
}
|
||||
},
|
||||
// 显示弹窗(重置表单)
|
||||
showDialog() {
|
||||
this.resetForm();
|
||||
@@ -263,14 +280,10 @@
|
||||
this._confirmBucketAssembly()
|
||||
this.labelPrint()
|
||||
},
|
||||
async _confirmBucketAssembly () {
|
||||
async _confirmBucketAssembly (username, password) {
|
||||
this.disabled = true
|
||||
if (this.flag || !this.val1 || !this.weight || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await confirmBucketAssembly(this.val1, this.weight, this.num, this.pcsn, this.materialData.material_id)
|
||||
let res = await confirmBucketAssembly(username, password, this.val1, this.weight, this.num, this.pcsn, this.materialData.material_id)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -138,8 +138,8 @@
|
||||
},
|
||||
methods: {
|
||||
async _authority () {
|
||||
// let res = await authority()
|
||||
let res = await allAuthority()
|
||||
let res = await authority()
|
||||
// let res = await allAuthority()
|
||||
if (res.code === '1') {
|
||||
this.menuList = [...res.result.rf_menu1.sonTree]
|
||||
} else {
|
||||
|
||||
@@ -150,9 +150,9 @@ export const byBagCodeInfo = (mid) => request({
|
||||
data: {material_id: mid}
|
||||
})
|
||||
// 物料组袋
|
||||
export const confirmBagAssembly = (bagNo, mid, suppCode, qty, pcsn, vperiod) => request({
|
||||
export const confirmBagAssembly = (username, password, bagNo, mid, suppCode, qty, pcsn, vperiod) => request({
|
||||
url:'api/pdaCommon/confirmBagAssembly',
|
||||
data: {bagNo: bagNo, materialId: mid, suppCode: suppCode, qty: qty, pcsn: pcsn, validity_period: vperiod}
|
||||
data: {username: username, password: RSAencrypt(password), bagNo: bagNo, materialId: mid, suppCode: suppCode, qty: qty, pcsn: pcsn, validity_period: vperiod}
|
||||
})
|
||||
// 物料组袋-打印
|
||||
export const printBag = (row, printId) => request({
|
||||
@@ -184,9 +184,9 @@ export const queryRecordNoBucked = () => request({
|
||||
data: {}
|
||||
})
|
||||
// 物料组桶
|
||||
export const confirmBucketAssembly = (bcode, bweight, qty, pcsn, mid) => request({
|
||||
export const confirmBucketAssembly = (username, password, bcode, bweight, qty, pcsn, mid) => request({
|
||||
url:'api/pdaCommon/confirmBucketAssembly',
|
||||
data: {bucket_code: bcode, bucket_weight: bweight, qty: qty, pcsn: pcsn, material_id: mid}
|
||||
data: {username: username, password: RSAencrypt(password), bucket_code: bcode, bucket_weight: bweight, qty: qty, pcsn: pcsn, material_id: mid}
|
||||
})
|
||||
// 物料组桶-打印
|
||||
export const printBucked = (row, printId) => request({
|
||||
|
||||
@@ -28,7 +28,6 @@ export const allAuthority = () => {
|
||||
{menu_id: '5', title: '损益管理', path: '/pages/hdyy/ccgl/sy-manage'},
|
||||
{menu_id: '6', title: '虚拟入库', path: '/pages/hdyy/ccgl/xuni-instore'},
|
||||
{menu_id: '7', title: '虚拟出库', path: '/pages/hdyy/ccgl/xuni-outstore'}
|
||||
|
||||
]},
|
||||
{menu_id: '5', path: 'RF05', title: '生产管理', sonTree: [
|
||||
{menu_id: '1', title: '成品出料', path: '/pages/hdyy/scgl/cp-chuliao'},
|
||||
|
||||
Reference in New Issue
Block a user