物料盘点

This commit is contained in:
hehaibing-1996
2025-02-12 09:06:27 +08:00
parent 6790d94f39
commit 3bfc77f943
9 changed files with 1130 additions and 86 deletions

View File

@ -10,7 +10,7 @@ export function getConfig(key, defaultValue) {
}
export function getServerIPAndPort() {
var serverIP = getConfig('serverIP', '192.168.119.36');
var serverIP = getConfig('serverIP', '192.168.5.132');
var serverPort = getConfig('serverPort', '8888');
return serverIP + ':' + serverPort;
}

View File

@ -187,7 +187,7 @@
// 注意这里假设你的字节数组已经是正确的UTF-8编码并且不需要额外的处理来组合多字节字符
originalString += String.fromCharCode(byteArray[i]);
}
this.locationCode = originalString;
this.locationCode = encodedString;
//调用接口获取当前工位信息 当前工位是否有货架
var serverIPAndPort = getServerIPAndPort();
uni.request({
@ -215,7 +215,9 @@
this.isNeedScanLocationCode = false;
this.isNeedCallShelfCode = true;
this.placeholderText = '请呼叫货架';
} else {
}
else
{
this.isNeedScanLocationCode = false;
this.isNeedCallShelfCode = false;
this.placeholderText = '输入编码或名称';

View File

@ -1,22 +1,570 @@
<template>
<view>
<view class="bg-image">
<uni-popup ref="popup" type="dialog">
<view class="popup-content">
<view class="info-item">
<label>物料编码</label>
<text>{{fixedInfo.matCode}}</text>
</view>
<view class="info-item">
<label>物料名称</label>
<text>{{fixedInfo.matName}}</text>
</view>
<view class="info-item">
<label>物料规格</label>
<text>{{fixedInfo.matSpec}}</text>
</view>
<view class="input-item" style="background-color: wheat;">
<label>数量</label>
<input ref="inputRef" v-model.number="inputValue" type="number" placeholder="输入数量" />
</view>
<view class="button-group">
<button @click="hidePopup">取消</button>
<button @click="saveData">保存</button>
</view>
</view>
</uni-popup>
<view class="diy-flex-row">
<view style="flex: 3">
<!-- 占位 -->
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
<view class="uni-input-wrapper" style="flex: 60;">
<input id="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
:placeholder="placeholderText" v-model="matCodeCondition" @blur="queryMatList"></input>
</view>
<view style="flex: 3;">
</view>
<view style="flex: 30;">
<button @click="queryMatList">查询</button>
</view>
</view>
</view>
<view style="flex: 2">
<!-- 占位 -->
</view>
</view>
<view class="diy-flex-column" style="margin-top: 5rpx;">
<view class="diy-flex-inforow">
<view style="width: 10rpx;"></view>
<view style="width: 275rpx;">记录数:[{{recordCount}}]</view>
<view style="width: 10rpx;"></view>
<view style="width: 455rpx;">货架码:{{shelfCode}}</view>
</view>
</view>
<view class="diy-flex-column" style="margin-top: 5rpx;">
<scroll-view class="scroll-view" scroll-y="true">
<view v-for="(item, index) in cardData" :key="index" @longpress="longpress(item)">
<Card :item="item" :currentIndex="index" :cardData="cardData" />
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import bindSelectMat from '@/pages/bindSelectMat/bindSelectMat.vue';
import {
recive
} from '../../src/libs/Broadcast.js';
import {
unregisterReceiver
} from '../../src/libs/Broadcast.js';
import {
getConfig
} from '@/config.js';
import {
saveConfig
} from '@/config.js';
import {
getServerIPAndPort
} from '@/config.js';
import Card from '@/components/Card.vue';
import {
ref,
nextTick
} from 'vue';
import uniPopup from '@/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup';
export default {
components: {
uniPopup,
Card
},
setup() {
// 不能修改的信息
const fixedInfo = {
infoId: 0,
matCode: '示例名称',
matName: '这是一段示例描述',
matSpec: '',
matQty: 0,
};
const popup = ref(null);
const inputValue = ref('');
const showPopup = (info) => {
fixedInfo.infoId = info.id;
fixedInfo.matCode = info.matCode;
fixedInfo.matName = info.matName;
fixedInfo.matSpec = info.matSpec;
fixedInfo.matQty = info.matQty;
inputValue.value = info.matQty;
popup.value.open();
// nextTick(() => {
// inputRef.value.focus();
// });
};
const hidePopup = () => {
popup.value.close();
};
const saveData = () => {
if (inputValue.value == fixedInfo.matQty) {
uni.showToast({
title: '本次修改未修改数量',
icon: 'none',
duration: 1500
});
hidePopup();
return;
}
if (inputValue.value < 0) {
uni.showToast({
title: '您所输入的数量应该大于0',
icon: 'none',
duration: 1500
});
return;
}
if (inputValue.value == 0) {
uni.showToast({
title: '数量为0请使用删除功能',
icon: 'none',
duration: 1500
});
return;
}
var serverIPAndPort = getServerIPAndPort();
//调用接口进行数量的修改
uni.request({
url: 'http://' + serverIPAndPort +'/matDetailCurrenInfo/updateMatDetailCurrentInfoById', // 请求的接口地址
method: 'POST', // 设置请求方式为 POST
data: {
"matQty": inputValue.value,
"matDetailCurrentInfoId": fixedInfo.infoId,
"userName": getConfig('userName', 'admin'),
"deviceType": "PDA"
},
header: {
'Content-Type': 'application/json', // 如果需要以JSON格式发送数据
},
success: (res) => {
// 请求成功的回调函数
if (res.statusCode === 200) {
//接口返回数据为200 表示获取成功!
if (res.data.code == 200) {
uni.showToast({
title: '修改成功!',
icon: 'none',
duration: 1200
});
hidePopup();
} else {
uni.showToast({
title: '修改失败:' + res.data.message,
icon: 'none',
duration: 2500
});
}
} else {
uni.showToast({
title: '服务器返回错误状态码' + res.statusCode,
icon: 'none',
duration: 2500
});
}
},
fail: (err) => {
// 请求失败的回调函数
uni.showToast({
title: '请求失败' + err,
icon: 'none',
duration: 2500
});
this.clear();
},
complete: (event) => {
// 请求完成的回调函数(无论成功或失败都会调用)
}
});
};
return {
fixedInfo,
popup,
inputValue,
showPopup,
hidePopup,
saveData
};
},
data() {
return {
locationId: null,
locationCode: '',
userName: '', //当前登录的用户名
recordCount: 0,
shelfId: null,
shelfCode: '',
placeholderText: '请先扫描货架码',
matCodeCondition: '', //物料编码搜索条件
cardData: null,
}
},
methods: {
onShow: function() {
this.userName = getConfig('userName', 'admin');
const self = this; // 保存this的引用
recive(function(res) {
console.log("Success:" + res.data);
self.analysisScanCode(res.data);
}, function(err) {
console.log("Error:", JSON.stringify(err)); // 正确打印错误信息
});
},
methods: {
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
// 分割字符串并转换为字节数组
let byteStrings = encodedString.split(',');
let byteArray = [];
for (let byteString of byteStrings) {
byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数
}
// 将字节数组转换为UTF-8字符串
// 注意这里使用了一个简单的循环来构建字符串因为String.fromCharCode.apply可能在大数据上性能不佳
let originalString = '';
for (let i = 0; i < byteArray.length; i++) {
// 对于每个字节使用fromCharCode转换为对应的字符
// 注意这里假设你的字节数组已经是正确的UTF-8编码并且不需要额外的处理来组合多字节字符
originalString += String.fromCharCode(byteArray[i]);
}
this.shelfCode = originalString;
//调用接口获取当前工位信息 当前工位是否有货架
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: 'http://' + serverIPAndPort +
'/matDetailCurrenInfo/getMatDetailCurrentInfos', // 请求的接口地址
method: 'POST', // 设置请求方式为 POST
data: {
"shelfCode": this.shelfCode,
"matCode": '',
"userName": this.userName,
"deviceType": "PDA",
"pageNumber": 1,
"pageSize": 100
},
header: {
'Content-Type': 'application/json', // 如果需要以JSON格式发送数据
},
success: (res) => {
// 请求成功的回调函数
if (res.statusCode === 200) {
//接口返回数据为200 表示获取成功!
if (res.data.code == 200) {
//未查询到信息
if (res.data.data == null || res.data.data.count == 0) {
uni.showToast({
title: '该货架不存在绑定的物料信息!',
icon: 'none',
duration: 1500
});
return;
}
//有物料信息
this.cardData = res.data.data.lists;
this.recordCount = res.data.data.count;
uni.showToast({
title: '获取成功!',
icon: 'none',
duration: 100
});
} else {
uni.showToast({
title: '获取失败:' + res.data.message,
icon: 'none',
duration: 3500
});
this.clear();
}
} else {
uni.showToast({
title: '服务器返回错误状态码' + res.statusCode,
icon: 'none',
duration: 3000
});
this.clear();
}
},
fail: (err) => {
// 请求失败的回调函数
uni.showToast({
title: '请求失败' + err,
icon: 'none',
duration: 3000
});
this.clear();
},
complete: (event) => {
// 请求完成的回调函数(无论成功或失败都会调用)
console.log('请求完成', event);
}
});
},
queryMatList: function() {
if (this.shelfCode == null || this.shelfCode == '') {
uni.showToast({
title: '请先扫描货架码!',
icon: 'none',
duration: 1000
});
return;
}
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: 'http://' + serverIPAndPort +
'/matDetailCurrenInfo/getMatDetailCurrentInfos', // 请求的接口地址
method: 'POST', // 设置请求方式为 POST
data: {
"shelfCode": this.shelfCode,
"matCode": this.matCodeCondition,
"userName": this.userName,
"deviceType": "PDA",
"pageNumber": 1,
"pageSize": 100
},
header: {
'Content-Type': 'application/json', // 如果需要以JSON格式发送数据
},
success: (res) => {
// 请求成功的回调函数
if (res.statusCode === 200) {
//接口返回数据为200 表示获取成功!
if (res.data.code == 200) {
//未查询到信息
if (res.data.data == null || res.data.data.count == 0) {
uni.showToast({
title: '该货架不存在绑定的物料信息!',
icon: 'none',
duration: 1500
});
return;
}
//有物料信息
this.cardData = res.data.data.lists;
this.recordCount = res.data.data.count;
uni.showToast({
title: '获取成功!',
icon: 'none',
duration: 100
});
} else {
uni.showToast({
title: '获取失败:' + res.data.message,
icon: 'none',
duration: 3500
});
this.clear();
}
} else {
uni.showToast({
title: '服务器返回错误状态码' + res.statusCode,
icon: 'none',
duration: 3000
});
this.clear();
}
},
fail: (err) => {
// 请求失败的回调函数
uni.showToast({
title: '请求失败' + err,
icon: 'none',
duration: 3000
});
this.clear();
},
complete: (event) => {
// 请求完成的回调函数(无论成功或失败都会调用)
console.log('请求完成', event);
}
});
},
//清空当前界面所有内容
clear: function() {
this.placeholderText = '请先扫描货架码';
this.cardData = null;
this.recordCount = 0;
},
//长按
longpress(item) {
this.showPopup(item);
},
}
}
</script>
<style>
.uni-input-wrapper {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: nowrap;
background-color: #FFFFFF;
}
.mini-btn {
margin-right: 10rpx;
}
.bg-image {
background-image: url('/static/background.png');
/* 背景图片路径 */
background-size: cover;
/* 背景图片覆盖整个元素 */
background-position: center;
/* 背景图片居中 */
height: 100%;
/* 视图高度设置为100% */
width: 100%;
/* 视图宽度设置为100% */
position: fixed;
/* 视图定位为固定 */
top: 0;
left: 0;
/* z-index: -1; */
}
.diy-flex-row {
display: flex;
flex-direction: row;
margin-top: 15rpx;
margin-bottom: 15rpx;
font-size: 50rpx;
}
.diy-flex-column {
display: flex;
flex-direction: column;
}
.diy-flex-inforow {
display: flex;
flex-direction: row;
font-size: 40rpx;
font-weight: 500;
margin-top: 8rpx;
margin-bottom: 8rpx;
}
.scroll-view {
height: 75vh;
}
.popup-content {
padding: 20px;
background-color: rgba(0, 0, 0, 1);
background-color: white;
z-index: 2;
border-radius: 20rpx;
}
.input-item {
margin-bottom: 5rpx;
display: flex;
align-items: center;
/* 让内部元素垂直居中 */
}
.input-item label {
display: inline-block;
}
.input-item input {
display: inline-block;
background: wheat;
width: 280rpx;
}
.button-group {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
}
.button-group button {
margin-top: 20rpx;
padding: 10rpx 10rpx;
border: none;
border-radius: 5px;
background-color: #007AFF;
color: #fff;
cursor: pointer;
}
</style>

View File

@ -9,13 +9,17 @@ export function recive(success, fail) {
receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', {
onReceive: function(context, intent) { //实现onReceiver回调函数
plus.android.importClass(intent); //通过intent实例引入intent类方便以后的.’操作
var action = intent.getAction()
var data
var action = intent.getAction();
console.log('zhanglp', action);
var data;
switch (action) {
case "com.android.server.scannerservice.broadcast":
data = intent.getExtra("scannerdata");
break
case "com.service.scanner.data":
data = intent.getExtra("ScanCode");
console.log('zhanglp', data.replace(/\n/, ''))
break
case "android.intent.action.SCANRESULT":
data = intent.getExtra("value");
@ -99,7 +103,7 @@ export function recive(success, fail) {
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.honeywell.scan.broadcast");
filter.addAction("com.service.scanner.data");
main.registerReceiver(receiver, filter); //注册监听
// #endif

View File

@ -1,8 +1,8 @@
{
"hash": "b0fe367b",
"hash": "f663bba1",
"configHash": "e12fdbcd",
"lockfileHash": "e3b0c442",
"browserHash": "aae2cf7f",
"lockfileHash": "d2aaf416",
"browserHash": "5c516658",
"optimized": {},
"chunks": {}
}

View File

@ -2,7 +2,7 @@
;(function(){
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"智慧物流系统-移动端","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"PDA","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.45","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"智慧物流系统-登录","type":"default"},"isNVue":false}},{"path":"pages/config/config","meta":{"navigationBar":{"titleText":"智慧物流系统-用户配置","type":"default"},"isNVue":false}},{"path":"pages/main/main","meta":{"navigationBar":{"titleText":"智慧物流系统-主页","type":"default"},"isNVue":false}},{"path":"pages/bind/bind","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定","type":"default"},"isNVue":false}},{"path":"pages/bindSelectMat/bindSelectMat","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}},{"path":"pages/queryBindList/queryBindList","meta":{"navigationBar":{"titleText":"智慧物流系统-绑定查询","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"智慧物流系统-登录","type":"default"},"isNVue":false}},{"path":"pages/config/config","meta":{"navigationBar":{"titleText":"智慧物流系统-用户配置","type":"default"},"isNVue":false}},{"path":"pages/main/main","meta":{"navigationBar":{"titleText":"智慧物流系统-主页","type":"default"},"isNVue":false}},{"path":"pages/bind/bind","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定","type":"default"},"isNVue":false}},{"path":"pages/bindSelectMat/bindSelectMat","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}},{"path":"pages/queryBindList/queryBindList","meta":{"navigationBar":{"titleText":"智慧物流系统-绑定查询","type":"default"},"isNVue":false}},{"path":"pages/stockTaking/stockTaking","meta":{"navigationBar":{"titleText":"智慧物流系统-库存盘点","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[];//styles
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});

View File

@ -49,11 +49,16 @@ if (uni.restoreGlobal) {
onReceive: function(context, intent) {
plus.android.importClass(intent);
var action = intent.getAction();
formatAppLog("log", "at src/libs/Broadcast.js:13", "zhanglp", action);
var data;
switch (action) {
case "com.android.server.scannerservice.broadcast":
data = intent.getExtra("scannerdata");
break;
case "com.service.scanner.data":
data = intent.getExtra("ScanCode");
formatAppLog("log", "at src/libs/Broadcast.js:21", "zhanglp", data.replace(/\n/, ""));
break;
case "android.intent.action.SCANRESULT":
data = intent.getExtra("value");
break;
@ -120,10 +125,11 @@ if (uni.restoreGlobal) {
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.honeywell.scan.broadcast");
filter.addAction("com.service.scanner.data");
main.registerReceiver(receiver, filter);
}
function unregisterReceiver() {
formatAppLog("log", "at src/libs/Broadcast.js:110", "取消监听广播");
formatAppLog("log", "at src/libs/Broadcast.js:114", "取消监听广播");
main.unregisterReceiver(receiver);
}
function saveConfig(key, value) {
@ -133,7 +139,7 @@ if (uni.restoreGlobal) {
return uni.getStorageSync(key) || defaultValue;
}
function getServerIPAndPort() {
var serverIP = getConfig("serverIP", "192.168.119.36");
var serverIP = getConfig("serverIP", "192.168.5.132");
var serverPort = getConfig("serverPort", "8888");
return serverIP + ":" + serverPort;
}
@ -145,7 +151,7 @@ if (uni.restoreGlobal) {
}
return target;
};
const _sfc_main$a = {
const _sfc_main$b = {
data() {
return {
title: "登录",
@ -221,7 +227,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("navigator", {
url: "../config/config",
@ -307,8 +313,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]);
const _sfc_main$9 = {
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]);
const _sfc_main$a = {
data() {
return {
serverIP: "",
@ -330,7 +336,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("label", null, "服务器IP:"),
@ -367,7 +373,7 @@ if (uni.restoreGlobal) {
}, "保存配置")
]);
}
const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/config/config.vue"]]);
const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/config/config.vue"]]);
const _imports_0$1 = "/static/logOut.png";
const _imports_1 = "/static/bind.png";
const _imports_2 = "/static/bindQuery.png";
@ -375,13 +381,13 @@ if (uni.restoreGlobal) {
const _imports_4 = "/static/callOut.png";
const _imports_5 = "/static/stockTaking.png";
const _imports_6 = "/static/task.png";
const _sfc_main$8 = {
const _sfc_main$9 = {
data() {
return {};
},
methods: {}
};
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("navigator", {
@ -482,16 +488,21 @@ if (uni.restoreGlobal) {
class: "uni-flex uni-column",
style: { "flex": "5" }
}, [
vue.createElementVNode("view", {
class: "uni-flex uni-row",
style: { "-webkit-justify-content": "center", "justify-content": "center" }
vue.createElementVNode("navigator", {
url: "../stockTaking/stockTaking",
"hover-class": "navigator-hover"
}, [
vue.createElementVNode("image", {
class: "function-image",
src: _imports_5
})
]),
vue.createElementVNode("view", { class: "function-text" }, "库存盘点")
vue.createElementVNode("view", {
class: "uni-flex uni-row",
style: { "-webkit-justify-content": "center", "justify-content": "center" }
}, [
vue.createElementVNode("image", {
class: "function-image",
src: _imports_5
})
]),
vue.createElementVNode("view", { class: "function-text" }, "库存盘点")
])
]),
vue.createElementVNode("view", {
class: "uni-flex uni-column",
@ -512,8 +523,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]);
const _sfc_main$7 = {
const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]);
const _sfc_main$8 = {
data() {
return {
visible: false,
@ -599,7 +610,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
return $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "popup-container"
@ -630,9 +641,9 @@ if (uni.restoreGlobal) {
])
])) : vue.createCommentVNode("v-if", true);
}
const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-68e7b952"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-68e7b952"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
const _imports_0 = "/static/scan.png";
const _sfc_main$6 = {
const _sfc_main$7 = {
components: {
bindSelectMat: PagesBindSelectMatBindSelectMat
},
@ -672,15 +683,9 @@ if (uni.restoreGlobal) {
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
let byteStrings = encodedString.split(",");
let byteArray = [];
for (let byteString of byteStrings) {
byteArray.push(parseInt(byteString, 10));
}
let originalString = "";
for (let i = 0; i < byteArray.length; i++) {
originalString += String.fromCharCode(byteArray[i]);
}
this.locationCode = originalString;
this.locationCode = encodedString;
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/pdaMatBind/getShelfInfoByLocationCode",
@ -865,7 +870,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
const _component_bindSelectMat = vue.resolveComponent("bindSelectMat");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createVNode(_component_bindSelectMat, {
@ -1042,7 +1047,7 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bind/bind.vue"]]);
const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bind/bind.vue"]]);
class MPAnimation {
constructor(options, _this) {
this.options = options;
@ -1153,7 +1158,7 @@ if (uni.restoreGlobal) {
clearTimeout(_this.timer);
return new MPAnimation(option, _this);
}
const _sfc_main$5 = {
const _sfc_main$6 = {
name: "uniTransition",
emits: ["click", "change"],
props: {
@ -1400,7 +1405,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
ref: "ani",
@ -1412,8 +1417,8 @@ if (uni.restoreGlobal) {
vue.renderSlot(_ctx.$slots, "default")
], 14, ["animation"])) : vue.createCommentVNode("v-if", true);
}
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
const _sfc_main$4 = {
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
const _sfc_main$5 = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
@ -1741,7 +1746,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
"view",
@ -1801,8 +1806,8 @@ if (uni.restoreGlobal) {
/* CLASS */
)) : vue.createCommentVNode("v-if", true);
}
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-4dd3c44b"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
const _sfc_main$3 = {
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-4dd3c44b"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
const _sfc_main$4 = {
__name: "Card",
props: {
item: {
@ -1826,7 +1831,7 @@ if (uni.restoreGlobal) {
return __returned__;
}
};
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
vue.createElementVNode("view", { class: "card-header" }, [
vue.createElementVNode(
@ -1927,8 +1932,8 @@ if (uni.restoreGlobal) {
])
]);
}
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-29c414df"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/Card.vue"]]);
const _sfc_main$2 = {
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-29c414df"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/Card.vue"]]);
const _sfc_main$3 = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
@ -2281,7 +2286,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
"view",
@ -2341,8 +2346,8 @@ if (uni.restoreGlobal) {
/* CLASS */
)) : vue.createCommentVNode("v-if", true);
}
const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-7db519c7"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
const _sfc_main$1 = {
const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-7db519c7"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
const _sfc_main$2 = {
components: {
uniPopup,
Card
@ -2647,6 +2652,491 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_Card = vue.resolveComponent("Card");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createVNode(
_component_uni_popup,
{
ref: "popup",
type: "dialog"
},
{
default: vue.withCtx(() => [
vue.createElementVNode("view", { class: "popup-content" }, [
vue.createElementVNode("view", { class: "info-item" }, [
vue.createElementVNode("label", null, "物料编码:"),
vue.createElementVNode(
"text",
null,
vue.toDisplayString($setup.fixedInfo.matCode),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { class: "info-item" }, [
vue.createElementVNode("label", null, "物料名称:"),
vue.createElementVNode(
"text",
null,
vue.toDisplayString($setup.fixedInfo.matName),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { class: "info-item" }, [
vue.createElementVNode("label", null, "物料规格:"),
vue.createElementVNode(
"text",
null,
vue.toDisplayString($setup.fixedInfo.matSpec),
1
/* TEXT */
)
]),
vue.createElementVNode("view", {
class: "input-item",
style: { "background-color": "wheat" }
}, [
vue.createElementVNode("label", null, "数量:"),
vue.withDirectives(vue.createElementVNode(
"input",
{
ref: "inputRef",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.inputValue = $event),
type: "number",
placeholder: "输入数量"
},
null,
512
/* NEED_PATCH */
), [
[
vue.vModelText,
$setup.inputValue,
void 0,
{ number: true }
]
])
]),
vue.createElementVNode("view", { class: "button-group" }, [
vue.createElementVNode("button", {
onClick: _cache[1] || (_cache[1] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
}, "取消"),
vue.createElementVNode("button", {
onClick: _cache[2] || (_cache[2] = (...args) => $setup.saveData && $setup.saveData(...args))
}, "保存")
])
])
]),
_: 1
/* STABLE */
},
512
/* NEED_PATCH */
),
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", { style: { "flex": "3" } }, [
vue.createCommentVNode(" 占位 ")
]),
vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
style: { "width": "60rpx", "height": "60rpx" },
src: _imports_0
})
]),
vue.createElementVNode("view", {
class: "uni-input-wrapper",
style: { "flex": "60" }
}, [
vue.withDirectives(vue.createElementVNode("input", {
id: "inputMatCode",
class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[4] || (_cache[4] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
]),
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[5] || (_cache[5] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, "查询")
])
])
]),
vue.createElementVNode("view", { style: { "flex": "2" } }, [
vue.createCommentVNode(" 占位 ")
])
]),
vue.createElementVNode("view", {
class: "diy-flex-column",
style: { "margin-top": "5rpx" }
}, [
vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
vue.createElementVNode("view", { style: { "width": "10rpx" } }),
vue.createElementVNode(
"view",
{ style: { "width": "275rpx" } },
"记录数:[" + vue.toDisplayString($data.recordCount) + "]",
1
/* TEXT */
),
vue.createElementVNode("view", { style: { "width": "10rpx" } }),
vue.createElementVNode(
"view",
{ style: { "width": "455rpx" } },
"货架码:" + vue.toDisplayString($data.shelfCode),
1
/* TEXT */
)
])
]),
vue.createElementVNode("view", {
class: "diy-flex-column",
style: { "margin-top": "5rpx" }
}, [
vue.createElementVNode("scroll-view", {
class: "scroll-view",
"scroll-y": "true"
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_Card, {
item,
currentIndex: index,
cardData: $data.cardData
}, null, 8, ["item", "currentIndex", "cardData"])
], 40, ["onLongpress"]);
}),
128
/* KEYED_FRAGMENT */
))
])
])
]);
}
const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
const _sfc_main$1 = {
components: {
uniPopup,
Card
},
setup() {
const fixedInfo = {
infoId: 0,
matCode: "示例名称",
matName: "这是一段示例描述",
matSpec: "",
matQty: 0
};
const popup = vue.ref(null);
const inputValue = vue.ref("");
const showPopup = (info) => {
fixedInfo.infoId = info.id;
fixedInfo.matCode = info.matCode;
fixedInfo.matName = info.matName;
fixedInfo.matSpec = info.matSpec;
fixedInfo.matQty = info.matQty;
inputValue.value = info.matQty;
popup.value.open();
};
const hidePopup = () => {
popup.value.close();
};
const saveData = () => {
if (inputValue.value == fixedInfo.matQty) {
uni.showToast({
title: "本次修改未修改数量",
icon: "none",
duration: 1500
});
hidePopup();
return;
}
if (inputValue.value < 0) {
uni.showToast({
title: "您所输入的数量应该大于0",
icon: "none",
duration: 1500
});
return;
}
if (inputValue.value == 0) {
uni.showToast({
title: "数量为0请使用删除功能",
icon: "none",
duration: 1500
});
return;
}
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/updateMatDetailCurrentInfoById",
// 请求的接口地址
method: "POST",
// 设置请求方式为 POST
data: {
"matQty": inputValue.value,
"matDetailCurrentInfoId": fixedInfo.infoId,
"userName": getConfig("userName", "admin"),
"deviceType": "PDA"
},
header: {
"Content-Type": "application/json"
// 如果需要以JSON格式发送数据
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.code == 200) {
uni.showToast({
title: "修改成功!",
icon: "none",
duration: 1200
});
hidePopup();
} else {
uni.showToast({
title: "修改失败:" + res.data.message,
icon: "none",
duration: 2500
});
}
} else {
uni.showToast({
title: "服务器返回错误状态码" + res.statusCode,
icon: "none",
duration: 2500
});
}
},
fail: (err) => {
uni.showToast({
title: "请求失败" + err,
icon: "none",
duration: 2500
});
this.clear();
},
complete: (event) => {
}
});
};
return {
fixedInfo,
popup,
inputValue,
showPopup,
hidePopup,
saveData
};
},
data() {
return {
locationId: null,
locationCode: "",
userName: "",
//当前登录的用户名
recordCount: 0,
shelfId: null,
shelfCode: "",
placeholderText: "请先扫描货架码",
matCodeCondition: "",
//物料编码搜索条件
cardData: null
};
},
onShow: function() {
this.userName = getConfig("userName", "admin");
const self = this;
recive(function(res) {
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:267", "Success:" + res.data);
self.analysisScanCode(res.data);
}, function(err) {
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:270", "Error:", JSON.stringify(err));
});
},
methods: {
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
let byteStrings = encodedString.split(",");
let byteArray = [];
for (let byteString of byteStrings) {
byteArray.push(parseInt(byteString, 10));
}
let originalString = "";
for (let i = 0; i < byteArray.length; i++) {
originalString += String.fromCharCode(byteArray[i]);
}
this.shelfCode = originalString;
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
// 请求的接口地址
method: "POST",
// 设置请求方式为 POST
data: {
"shelfCode": this.shelfCode,
"matCode": "",
"userName": this.userName,
"deviceType": "PDA",
"pageNumber": 1,
"pageSize": 100
},
header: {
"Content-Type": "application/json"
// 如果需要以JSON格式发送数据
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.code == 200) {
if (res.data.data == null || res.data.data.count == 0) {
uni.showToast({
title: "该货架不存在绑定的物料信息!",
icon: "none",
duration: 1500
});
return;
}
this.cardData = res.data.data.lists;
this.recordCount = res.data.data.count;
uni.showToast({
title: "获取成功!",
icon: "none",
duration: 100
});
} else {
uni.showToast({
title: "获取失败:" + res.data.message,
icon: "none",
duration: 3500
});
this.clear();
}
} else {
uni.showToast({
title: "服务器返回错误状态码" + res.statusCode,
icon: "none",
duration: 3e3
});
this.clear();
}
},
fail: (err) => {
uni.showToast({
title: "请求失败" + err,
icon: "none",
duration: 3e3
});
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:362", "请求完成", event);
}
});
},
queryMatList: function() {
if (this.shelfCode == null || this.shelfCode == "") {
uni.showToast({
title: "请先扫描货架码!",
icon: "none",
duration: 1e3
});
return;
}
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
// 请求的接口地址
method: "POST",
// 设置请求方式为 POST
data: {
"shelfCode": this.shelfCode,
"matCode": this.matCodeCondition,
"userName": this.userName,
"deviceType": "PDA",
"pageNumber": 1,
"pageSize": 100
},
header: {
"Content-Type": "application/json"
// 如果需要以JSON格式发送数据
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.code == 200) {
if (res.data.data == null || res.data.data.count == 0) {
uni.showToast({
title: "该货架不存在绑定的物料信息!",
icon: "none",
duration: 1500
});
return;
}
this.cardData = res.data.data.lists;
this.recordCount = res.data.data.count;
uni.showToast({
title: "获取成功!",
icon: "none",
duration: 100
});
} else {
uni.showToast({
title: "获取失败:" + res.data.message,
icon: "none",
duration: 3500
});
this.clear();
}
} else {
uni.showToast({
title: "服务器返回错误状态码" + res.statusCode,
icon: "none",
duration: 3e3
});
this.clear();
}
},
fail: (err) => {
uni.showToast({
title: "请求失败" + err,
icon: "none",
duration: 3e3
});
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:449", "请求完成", event);
}
});
},
//清空当前界面所有内容
clear: function() {
this.placeholderText = "请先扫描货架码";
this.cardData = null;
this.recordCount = 0;
},
//长按
longpress(item) {
this.showPopup(item);
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_Card = vue.resolveComponent("Card");
@ -2826,13 +3316,14 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
const PagesStockTakingStockTaking = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/stockTaking/stockTaking.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
__definePage("pages/config/config", PagesConfigConfig);
__definePage("pages/main/main", PagesMainMain);
__definePage("pages/bind/bind", PagesBindBind);
__definePage("pages/bindSelectMat/bindSelectMat", PagesBindSelectMatBindSelectMat);
__definePage("pages/queryBindList/queryBindList", PagesQueryBindListQueryBindList);
__definePage("pages/stockTaking/stockTaking", PagesStockTakingStockTaking);
const _sfc_main = {
onLaunch: function() {
formatAppLog("log", "at App.vue:4", "App Launch");

View File

@ -30,7 +30,7 @@ namespace 智慧物流软件系统.ViewModel
StocktakingStatuses.Add(status.ToString());
}
SelectedStocktakingStatus = StocktakingStatuses.First();
}
#region Property
@ -125,7 +125,7 @@ namespace 智慧物流软件系统.ViewModel
MatCode = string.Empty;
MatName = string.Empty;
StocktakingUser = string.Empty;
SelectedStocktakingStatus = StocktakingStatuses.First();
SelectedStocktakingStatus = StocktakingStatuses.Where(t => t.Contains("未提交")).First();
}
public ICommand BtnSearchCommand { get => new DelegateCommand(BtnSearchReset); }
@ -184,7 +184,7 @@ namespace 智慧物流软件系统.ViewModel
public ICommand BtnCommitCommand { get => new DelegateCommand(BtnCommit); }
public async void BtnCommit()
{
Growl.Ask($"是否提交所有勾选数据]!", isConfirmed =>
Growl.Ask($"是否提交所有勾选数据?", isConfirmed =>
{
if (isConfirmed)
{

View File

@ -186,7 +186,6 @@
Binding="{Binding MatQty}"></DataGridTextColumn>
<DataGridTextColumn Header="盘点数量"
Binding="{Binding StocktakingQty}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True"
Header="盘点人"
Binding="{Binding StocktakingUser}"></DataGridTextColumn>