baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+693
@@ -0,0 +1,693 @@
|
||||
<template>
|
||||
<view class="main-wrapper">
|
||||
<view style="margin: 0 20rpx 20rpx 20rpx;">
|
||||
<view class="header-top1">
|
||||
<view v-if="pageKey==='detail'" class="header-top-back" @click="backToMain">
|
||||
<image
|
||||
src="../../../static/img/arrow.svg"
|
||||
class="img"
|
||||
></image>
|
||||
当前配送任务
|
||||
</view>
|
||||
<view v-else class="header-top-back"></view>
|
||||
|
||||
<view class="header-top-organzie1" style="">
|
||||
<text class="header-row-title-class1">当前组织:</text>
|
||||
<view class="header-top-organzie-select1">
|
||||
<picker
|
||||
@change="orgChange"
|
||||
:value="index"
|
||||
:range="orgArry"
|
||||
range-key="FNAME"
|
||||
style="width: 100%"
|
||||
>
|
||||
<view class="header-top-organzie-content1">
|
||||
{{ orgArry[index] ? orgArry[index].FNAME : "" }}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<image
|
||||
class="header-top-organzie-img1"
|
||||
src="@/static/img/changearrow.svg"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 单据类型 单据编号... -->
|
||||
<view v-if="pageKey === 'main'" class="content" style="margin: 0 20rpx 20rpx 20rpx;">
|
||||
<!-- 单据类型 -->
|
||||
<view class="input-content">
|
||||
<view class="input-content-label">单据类型</view>
|
||||
<view class="input-content-picker">
|
||||
<xfl-select :disabled="true" :list="billTypeArr" :listOrigin="billTypeArr" :clearable="false" :showItemNum="5" :isCanInput="false"
|
||||
@change="billTypePickerChange" ref="billTypeList"
|
||||
defaultSelectText=""/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 单据编号 -->
|
||||
<view class="input-content">
|
||||
<view class="input-content-label">单据编号</view>
|
||||
<view class="input-content-input">
|
||||
<input
|
||||
type="text"
|
||||
class="scan-input"
|
||||
placeholder=""
|
||||
v-model="billNo"
|
||||
:focus="billNoFocus"
|
||||
@confirm="billConfirm"
|
||||
/>
|
||||
<image
|
||||
src="../../../static/img/scan-blue.png"
|
||||
class="img"
|
||||
@click="scanEvent('bill')"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 产线/车间 -->
|
||||
<view class="input-content">
|
||||
<view class="input-content-label">产线/车间</view>
|
||||
<view class="input-content-input-disabled">
|
||||
<input
|
||||
type="text"
|
||||
:disabled="true"
|
||||
class="scan-input"
|
||||
placeholder=""
|
||||
v-model="workShopNo"
|
||||
:focus="workShopNoFocus"
|
||||
/>
|
||||
<!--<image-->
|
||||
<!-- src="../../../static/img/scan-blue.png"-->
|
||||
<!-- class="img"-->
|
||||
<!--></image>-->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 资源编号 -->
|
||||
<view class="input-content">
|
||||
<view class="input-content-label">资源编号</view>
|
||||
<view class="input-content-input-disabled">
|
||||
<input
|
||||
type="text"
|
||||
:disabled="true"
|
||||
class="scan-input"
|
||||
placeholder=""
|
||||
v-model="resourceNo"
|
||||
:focus="resourceNoFocus"
|
||||
/>
|
||||
<!--<image-->
|
||||
<!-- src="../../../static/img/scan-blue.png"-->
|
||||
<!-- class="img"-->
|
||||
<!-- @click="scanEvent"-->
|
||||
<!--></image>-->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table-tag-header">
|
||||
<view class="scan-header-item" @click="tag='配送物料'">
|
||||
<view :class="tag==='配送物料' ? 'scan-header-blue-text' : ''">配送物料</view>
|
||||
</view>
|
||||
<view style="border-left-width:3px; border-left-color: #E5E5E5; border-left-style: solid; height:40rpx; flex-grow: 0; flex-shrink: 0;"></view>
|
||||
<view class="scan-header-item" @click="tag='源单'">
|
||||
<view :class="tag==='源单' ? 'scan-header-blue-text' : ''">源单</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 表格 -->
|
||||
<view v-if="tag === '配送物料'">
|
||||
<!-- @onSelect='baseTableSelect' -->
|
||||
<z-table
|
||||
class="baseTable"
|
||||
:tableData="baseTableData"
|
||||
:columns="baseColumns"
|
||||
titleTextAlign="center"
|
||||
textAlign="center"
|
||||
emptyText="设置了showLoading=false才会看到我"
|
||||
/>
|
||||
</view>
|
||||
<view v-if="tag === '源单'">
|
||||
<!-- @onSelect='baseTableSelect' -->
|
||||
<z-table
|
||||
class="baseTable"
|
||||
:tableData="billTableData"
|
||||
:columns="billTableColumns"
|
||||
titleTextAlign="center"
|
||||
textAlign="center"
|
||||
emptyText="设置了showLoading=false才会看到我"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="button" v-if="pageKey==='main'">
|
||||
<view class="item" style="background-color: #fff" @click="clearPage">清空</view>
|
||||
<view class="item" style="color:#fff;background-color: #5778ff" @click="peiSongEvent">开始配送</view>
|
||||
</view>
|
||||
|
||||
<!-- 请求错误或成功 弹窗 -->
|
||||
<opsoft-dialog-notice
|
||||
:dialogNoticeShow="showErrorDialog"
|
||||
:dialogNoticeType="dialogNoticeType"
|
||||
:dialogNoticeTitle="dialogNoticeTitle"
|
||||
:dialogNoticeContent=" dialogNoticeContent"
|
||||
@dialogNoticeConfirmClick="showErrorDialog = false"
|
||||
/>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// PDA_PRD_CALLMATERIALSEND
|
||||
export default {
|
||||
name: "pailiao",
|
||||
data() {
|
||||
return {
|
||||
// org about
|
||||
orgArry: [],
|
||||
index: 0,
|
||||
orgFItemID: "",
|
||||
// head data
|
||||
/**
|
||||
* 单据类型
|
||||
*/
|
||||
billTypeIndex: 0,
|
||||
billTypeArr: [
|
||||
// 'bom', '非BOM'
|
||||
{
|
||||
value: 'BOM',
|
||||
},
|
||||
{
|
||||
value: '非BOM',
|
||||
},
|
||||
],
|
||||
billTypeFocus: false,
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
billNo: '',
|
||||
billNoFocus: true,
|
||||
/**
|
||||
* 产线/车间
|
||||
*/
|
||||
workShopNo: '',
|
||||
workShopNoFocus: false,
|
||||
/**
|
||||
* 资源编号
|
||||
*/
|
||||
resourceNo: '',
|
||||
resourceNoFocus: false,
|
||||
/**
|
||||
* 配送物料 表格相关
|
||||
*/
|
||||
baseColumns: [
|
||||
{ title: "物料代码", key: "FMATERIALNUMBER", width: 350, formatNum: false, },
|
||||
{ title: "物料名称", key: "FMATERIALNAME", width: 350, formatNum: false },
|
||||
{ title: "规格型号", key: "FSPECIFICATION", width: 350, formatNum: false },
|
||||
{ title: "批号", key: "FLOT", width: 350, formatNum: false },
|
||||
{ title: "辅助属性", key: "FAUXPROPNAME", width: 350, formatNum: false },
|
||||
{ title: "单位", key: "FUNITNAME", width: 350, formatNum: false },
|
||||
{ title: "配送数量", key: "FPICKEDQTY", width: 350, formatNum: false },
|
||||
],
|
||||
baseTableData: [],
|
||||
/**
|
||||
* 源单 表格相关
|
||||
*/
|
||||
billTableColumns: [
|
||||
{ title: "单据类型", key: "FBILLTYPENAME", width: 350, formatNum: false, },
|
||||
{ title: "单据编号", key: "FBILLNO", width: 350, formatNum: false },
|
||||
{ title: "工单明细行号", key: "FMOENTRYSEQ", width: 350, formatNum: false },
|
||||
{ title: "车间名称", key: "FWORKSHOPNAME", width: 350, formatNum: false },
|
||||
{ title: "工作资源", key: "FWORKRESOURCENAME", width: 350, formatNum: false },
|
||||
],
|
||||
billTableData: [],
|
||||
/**
|
||||
* 控制页面逻辑
|
||||
* @type { 'main' | 'detail'}
|
||||
*/
|
||||
pageKey: "main",
|
||||
/**
|
||||
* 主页页签切换
|
||||
* @type { '配送物料' | '源单' }
|
||||
*/
|
||||
tag: '配送物料',
|
||||
// 当前配送任务
|
||||
currentTasks: [
|
||||
{
|
||||
timeInfo: '10分28秒 已超时',
|
||||
bomInfo: 'BOM内叫料',
|
||||
billNo: '20220518003',
|
||||
workShopNo: '车间1产线3',
|
||||
resourceNo: '0001',
|
||||
},
|
||||
{
|
||||
timeInfo: '10分28秒 已超时',
|
||||
bomInfo: 'BOM内叫料',
|
||||
billNo: '20220518003',
|
||||
workShopNo: '车间1产线3',
|
||||
resourceNo: '0001',
|
||||
}
|
||||
],
|
||||
// 弹窗
|
||||
showErrorDialog: false,
|
||||
dialogNoticeType: 'error', // or success
|
||||
dialogNoticeTitle: '异常提示',
|
||||
dialogNoticeContent: 'content',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getOrgList();
|
||||
},
|
||||
methods: {
|
||||
getOrgList() {
|
||||
let _self = this
|
||||
let orgInfo = uni.getStorageSync("orgInfo")
|
||||
|
||||
if (orgInfo && orgInfo.length > 0) {
|
||||
let defaultOrgInfo = uni.getStorageSync("defaultOrgInfo")
|
||||
let isOpenDefaultOrg = uni.getStorageSync("isOpenDefaultOrg")
|
||||
if (!isOpenDefaultOrg) {
|
||||
this.orgFItemID = orgInfo[0].FINTERID
|
||||
} else {
|
||||
if (defaultOrgInfo) {
|
||||
this.orgFItemID = defaultOrgInfo.FINTERID
|
||||
} else {
|
||||
this.orgFItemID = orgInfo[0].FINTERID
|
||||
}
|
||||
}
|
||||
|
||||
this.orgArry = orgInfo
|
||||
this.orgArry.forEach(function (el, index) {
|
||||
let currentOrgid = el.FINTERID
|
||||
let result = currentOrgid == _self.orgFItemID
|
||||
if (result) {
|
||||
_self.index = index
|
||||
el.FNAME = el.FNAME ? el.FNAME : "无"
|
||||
}
|
||||
})
|
||||
// this.getDeptInfo()
|
||||
// this.getSupplierInfo()
|
||||
// this.getCustomerInfo()
|
||||
} else {
|
||||
this.orgArry = [
|
||||
{ name: "请选择组织", key: "", FNAME: "当前无组织" },
|
||||
]
|
||||
this.index = 0
|
||||
}
|
||||
},
|
||||
|
||||
orgChange(e) {
|
||||
this.isChangedOrg = true
|
||||
this.index = e.target.value
|
||||
let isOpenDefaultOrg = uni.getStorageSync("isOpenDefaultOrg")
|
||||
if (!this.orgArry[this.index].FINTERID) {
|
||||
this.orgFItemID = ""
|
||||
} else {
|
||||
this.orgFItemID = this.orgArry[this.index].FINTERID
|
||||
if (isOpenDefaultOrg) {
|
||||
uni.setStorageSync(
|
||||
"defaultOrgInfo",
|
||||
this.orgArry[this.index]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
this.clearPage()
|
||||
|
||||
// let cashValue = uni.getStorageSync(
|
||||
// "pageCash" +
|
||||
// this.dbAlise +
|
||||
// this.userName +
|
||||
// this.currentTranType +
|
||||
// this.orgFItemID
|
||||
// )
|
||||
// if (cashValue) {
|
||||
// this.loadByCash()
|
||||
// } else {
|
||||
// this.getDeptInfo()
|
||||
// this.getSupplierInfo()
|
||||
// this.getCustomerInfo()
|
||||
// this.orgChangedClear()
|
||||
// }
|
||||
//
|
||||
// this.$refs.bluetoothPrintTab.orgId = this.orgFItemID
|
||||
},
|
||||
scanEvent(event) {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
// 叫料单号 扫描
|
||||
if (event === 'bill') {
|
||||
this.billNo = res.result
|
||||
this.billConfirm();
|
||||
} else if (event === 'product') {
|
||||
// 生产任务单号 扫描
|
||||
// this.productTaskNo = res.result;
|
||||
// this.getCallBillInfo();
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
billConfirm() {
|
||||
if (this.billNo === "") {
|
||||
uni.showToast({
|
||||
title: "请输入单据编号",
|
||||
icon: "none",
|
||||
})
|
||||
return
|
||||
} else {
|
||||
// api 文档: https://www.tapd.cn/36031001/markdown_wikis/show/#1136031001001000968
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
mask:true
|
||||
})
|
||||
this.$request
|
||||
.post("/CallMaterial/GetCallBillInfo", {
|
||||
BillNo: this.billNo, // 叫料单号
|
||||
MoBillNo: undefined, // 工单号;生产任务单号
|
||||
WorkShop: undefined, // 车间号
|
||||
CompanyId: this.orgFItemID, // 组织号
|
||||
IsSend: false, // 固定
|
||||
type: 1
|
||||
})
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
console.log(res)
|
||||
let data = res;
|
||||
if (res.length === 0 ) {
|
||||
uni.showToast({
|
||||
title: "未查询到数据",
|
||||
icon: "none",
|
||||
})
|
||||
this.billTableData = [];
|
||||
this.baseTableData = []
|
||||
this.clearPage();
|
||||
} else {
|
||||
// 数据分配
|
||||
// 源单数据
|
||||
this.$refs.billTypeList.selectText = data[0].FBILLTYPENAME
|
||||
this.billNo = data[0].FBILLNO;
|
||||
this.workShopNo = data[0].FWORKSHOPNAME;
|
||||
this.resourceNo = data[0].FWORKRESOURCENAME;
|
||||
|
||||
this.billTableData = data;
|
||||
this.baseTableData = []
|
||||
data.forEach((item, index) => {
|
||||
// 处理序号
|
||||
item.index = index +1;
|
||||
item.Entries.forEach((el) => {
|
||||
el.FAUXPROPNAME = el.FAUXPROPNAME ? el.FAUXPROPNAME : "";
|
||||
})
|
||||
this.baseTableData.push(...item.Entries);
|
||||
})
|
||||
//
|
||||
// this.baseTableData = data;
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
uni.hideLoading();
|
||||
this.showErrorDialog = true;
|
||||
this.dialogNoticeType = "error";
|
||||
this.dialogNoticeTitle = "异常提示";
|
||||
this.dialogNoticeContent = err.toString();
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
backToMain() {
|
||||
this.pageKey = "main"
|
||||
},
|
||||
billTypePickerChange(e) {
|
||||
console.log(e)
|
||||
this.billTypeIndex= e.detail.value
|
||||
},
|
||||
/**
|
||||
* 开始配送
|
||||
*/
|
||||
peiSongEvent() {
|
||||
if (this.billNo === "") {
|
||||
uni.showToast({
|
||||
title: "请输入单据编号",
|
||||
icon: "none",
|
||||
})
|
||||
return
|
||||
} else {
|
||||
this.$request.get("/CallMaterial/StartSend", {
|
||||
params: {
|
||||
billNo: this.billNo,
|
||||
}
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: "开始配送成功",
|
||||
icon: "none",
|
||||
})
|
||||
this.clearPage()
|
||||
|
||||
}).catch((err) => {
|
||||
this.showErrorDialog = true;
|
||||
this.dialogNoticeType = "error";
|
||||
this.dialogNoticeTitle = "异常提示";
|
||||
this.dialogNoticeContent = err;
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 取消配送
|
||||
*/
|
||||
clearPage() {
|
||||
this.billNo = ""
|
||||
this.billTableData = []
|
||||
this.baseTableData = []
|
||||
this.resourceNo = "";
|
||||
this.workShopNo = "";
|
||||
this.$refs.billTypeList.selectText = "";
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.main-wrapper {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
// 底部按钮
|
||||
.button {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
.item {
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
//width: 100%
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
.table-tag-header {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
align-items: center;
|
||||
|
||||
.scan-header-item {
|
||||
flex-grow: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
color: #666666;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
|
||||
.scan-header-blue-text {
|
||||
color: #0000ff;
|
||||
border-bottom: 1px solid #0000ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scan {
|
||||
.scan-header2 {
|
||||
// 已录条码明细
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
.text {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.scan-button {
|
||||
background-color: #3241c4;
|
||||
padding: 0 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10rpx 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
border-bottom: 2px solid #e8e8e8;
|
||||
.img {
|
||||
width:40rpx;
|
||||
height:40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.current-task-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
//justify-content: space-between;
|
||||
//align-items: center;
|
||||
background-color: #f2f2f2;
|
||||
padding: 10rpx 40rpx;
|
||||
margin-bottom: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
//border-bottom: 2px solid #e8e8e8;
|
||||
.current-task-item-top {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.current-task-item-left {
|
||||
flex-grow: 4;
|
||||
}
|
||||
|
||||
.current-task-item-right {
|
||||
display: flex;
|
||||
align-self: flex-start;
|
||||
flex-direction: column;
|
||||
text-align: right;
|
||||
flex-grow: 1;
|
||||
.current-task-item-right-button {
|
||||
border-radius: 10rpx;
|
||||
font-size: 34rpx;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background-color: #169bd5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.header-top1 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.header-top-back {
|
||||
//align-content: flex-start;
|
||||
align-self: flex-start;
|
||||
font-size: 32rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666666;
|
||||
.img {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
vertical-align: middle;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.header-top-organzie1 {
|
||||
display: flex;
|
||||
// justify-content: flex-end;
|
||||
align-items: center;
|
||||
// padding-right: 50rpx;
|
||||
|
||||
.header-row-title-class1 {
|
||||
font-size: 32rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.header-top-organzie-select1 {
|
||||
min-width: 100rpx;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
.header-top-organzie-content1 {
|
||||
font-size: 32rpx;
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.header-top-organzie-img1 {
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8rpx;
|
||||
|
||||
.input-content-label {
|
||||
width: 200rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666;
|
||||
text-align: right;
|
||||
}
|
||||
.input-content-picker {
|
||||
flex-grow:1;
|
||||
margin-left: 20rpx;
|
||||
border: 1px solid gray;
|
||||
border-radius: 12rpx;
|
||||
.show-box {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.input-content-input, .input-content-input-disabled {
|
||||
flex-grow:1;
|
||||
border: 1px solid gray;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-left: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
height: 60rpx;
|
||||
|
||||
.asd {
|
||||
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.input-content-input-disabled {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user