Browse Source

改成vue3

hella_vue3
zhang_li 6 months ago
parent
commit
f017805d76
  1. 12
      .env.development
  2. 11
      .env.hella13
  3. 11
      .env.hella14
  4. 11
      .env.hella15
  5. 11
      .env.hella16
  6. 12
      .env.hella8
  7. 11
      .env.hella9
  8. 11
      .env.production
  9. 14
      .env.test
  10. 10
      package.json
  11. 78
      src/api/http.ts
  12. 60
      src/api/request2.js
  13. 8
      src/common/balance.js
  14. 2
      src/common/calc.js
  15. 50
      src/common/detail.js
  16. 2
      src/common/directory.js
  17. 5
      src/common/record.js
  18. 98
      src/common/style/new_style.css
  19. 48
      src/common/style/pdabasic.css
  20. 292
      src/components/my-paging/my-paging.vue
  21. 192
      src/manifest.json
  22. 224
      src/mycomponents/balance/balance.vue
  23. 51
      src/mycomponents/balance/balanceSelect.vue
  24. 26
      src/mycomponents/balance/batch.vue
  25. 51
      src/mycomponents/balance/bussinessType.vue
  26. 128
      src/mycomponents/balance/handleBalance.vue
  27. 30
      src/mycomponents/balance/location.vue
  28. 45
      src/mycomponents/balance/pack.vue
  29. 87
      src/mycomponents/balance/productionLabel.vue
  30. 126
      src/mycomponents/balance/recommendBalance.vue
  31. 28
      src/mycomponents/balance/toLocation.vue
  32. 74
      src/mycomponents/button/requestButton.vue
  33. 46
      src/mycomponents/common/comBlankView.vue
  34. 27
      src/mycomponents/common/comEmptyView.vue
  35. 122
      src/mycomponents/common/comListItem.vue
  36. 938
      src/mycomponents/common/comMessage.vue
  37. 25
      src/mycomponents/common/comPopup.vue
  38. 111
      src/mycomponents/container/targetContainer.vue
  39. 296
      src/mycomponents/detail/comDetailCard.vue
  40. 276
      src/mycomponents/detail/comJobDetailCard.vue
  41. 269
      src/mycomponents/detail/comRequestDetailCard.vue
  42. 40
      src/mycomponents/detail/detailBalanceInfo.vue
  43. 103
      src/mycomponents/detail/detailCommonInfo.vue
  44. 29
      src/mycomponents/detail/detailHandleInfo.vue
  45. 33
      src/mycomponents/detail/detailItemInfo.vue
  46. 32
      src/mycomponents/detail/detailPackageInfo.vue
  47. 39
      src/mycomponents/detail/detailRecommendInfo.vue
  48. 121
      src/mycomponents/detail/jobDetailPopup.vue
  49. 92
      src/mycomponents/detail/recordDetailCommonInfo.vue
  50. 113
      src/mycomponents/detail/recordDetailPopup.vue
  51. 102
      src/mycomponents/detail/requestDetailCommonInfo.vue
  52. 62
      src/mycomponents/item/item.vue
  53. 100
      src/mycomponents/item/itemCompareQty.vue
  54. 85
      src/mycomponents/item/itemInfo.vue
  55. 270
      src/mycomponents/item/itemInfoPopup.vue
  56. 86
      src/mycomponents/item/itemQty.vue
  57. 34
      src/mycomponents/job/jobBottom.vue
  58. 27
      src/mycomponents/job/jobComMainCard.vue
  59. 53
      src/mycomponents/job/jobComMainCardAsn.vue
  60. 130
      src/mycomponents/job/jobComMainDetailCard.vue
  61. 90
      src/mycomponents/job/jobCommonInfo.vue
  62. 125
      src/mycomponents/job/jobDetailPopup.vue
  63. 299
      src/mycomponents/job/jobFilter.vue
  64. 28
      src/mycomponents/job/jobNumber.vue
  65. 37
      src/mycomponents/job/jobPersonInfo.vue
  66. 76
      src/mycomponents/job/jobRequestInfo.vue
  67. 33
      src/mycomponents/job/jobSettingInfo.vue
  68. 42
      src/mycomponents/job/jobStatus.vue
  69. 37
      src/mycomponents/job/jobTop.vue
  70. 58
      src/mycomponents/job/jobTopAsn.vue
  71. 65
      src/mycomponents/jobList/jobList.vue
  72. 85
      src/mycomponents/location/location.vue
  73. 196
      src/mycomponents/location/locationCompare.vue
  74. 70
      src/mycomponents/location/locationDetail.vue
  75. 63
      src/mycomponents/location/locationInfo.vue
  76. 66
      src/mycomponents/location/locationStatus.vue
  77. 118
      src/mycomponents/location/requiredLocation.vue
  78. 179
      src/mycomponents/package/packageCard.vue
  79. 417
      src/mycomponents/package/packageDetailPopup.vue
  80. 324
      src/mycomponents/package/packageList.vue
  81. 195
      src/mycomponents/package/packageRecordCard.vue
  82. 278
      src/mycomponents/package/packageRecordList.vue
  83. 86
      src/mycomponents/package/packageTarget.vue
  84. 194
      src/mycomponents/popup/selectList.vue
  85. 50
      src/mycomponents/production/productionInfo.vue
  86. 68
      src/mycomponents/qty/balanceQty.vue
  87. 395
      src/mycomponents/qty/balanceQtyEdit.vue
  88. 101
      src/mycomponents/qty/compareQty.vue
  89. 493
      src/mycomponents/qty/countQtyEdit.vue
  90. 28
      src/mycomponents/qty/packQty.vue
  91. 49
      src/mycomponents/qty/packUnit.vue
  92. 94
      src/mycomponents/qty/qty.vue
  93. 82
      src/mycomponents/qty/recommendQty.vue
  94. 412
      src/mycomponents/qty/recommendQtyEdit.vue
  95. 36
      src/mycomponents/qty/stdUom.vue
  96. 36
      src/mycomponents/qty/uom.vue
  97. 238
      src/mycomponents/recommend/recommend.vue
  98. 221
      src/mycomponents/recommend/recommendCount.vue
  99. 150
      src/mycomponents/record/record.vue
  100. 301
      src/mycomponents/record/recordComDetailCard.vue

12
.env.development

@ -1,4 +1,10 @@
#VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api
#VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api
VITE_BASE_URL=http://localhost:12080/admin-api
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api
VITE_BASE_URL=http://localhost:12080/admin-api VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'

11
.env.hella13

@ -0,0 +1,11 @@
VITE_BASE_URL=http://172.21.32.13:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'

11
.env.hella14

@ -0,0 +1,11 @@
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'

11
.env.hella15

@ -0,0 +1,11 @@
VITE_BASE_URL=https://scp.faway-hella.com:81/api/admin-api
VITE_BASE_URL_IMAGE=https://scp.faway-hella.com:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com'

11
.env.hella16

@ -0,0 +1,11 @@
VITE_BASE_URL=https://scptest.faway-hella.com:81/api/admin-api
VITE_BASE_URL_IMAGE=https://scptest.faway-hella.com:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com'

12
.env.hella8

@ -0,0 +1,12 @@
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'

11
.env.hella9

@ -0,0 +1,11 @@
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'

11
.env.production

@ -1,4 +1,7 @@
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app
# VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:23111
VITE_BASE_URL=https://tmsapp.hongxianggroup.com.cn
VITE_BASE_URL_IMAGE=https://tmsapp.hongxianggroup.com.cn
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'

14
.env.test

@ -1,2 +1,12 @@
VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25203/api/admin-api
VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'

10
package.json

@ -11,10 +11,16 @@
"test:mp-weixin": "uni build -p mp-weixin",
"test:app": "uni build -p app",
"test:custom": "uni build -p",
"prod": "uni build --mode production",
"prod:mp-weixin": "uni build -p mp-weixin --mode production",
"prod:app": "uni build -p app --mode production",
"prod:custom": "uni build -p --mode production"
"prod:custom": "uni build -p --mode production",
"prod": "uni build --mode production",
"hella8": "uni build --mode hella8",
"hella9": "uni build --mode hella9",
"hella13": "uni build --mode hella13",
"hella14": "uni build --mode hella14",
"hella15": "uni build --mode hella15",
"hella16": "uni build --mode hella16"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001",

78
src/api/http.ts

@ -20,7 +20,16 @@ const instance = axios.create({
resolve(res)
},
fail: (error : any) => {
reject(error)
// var message = error.errMsg
// if (message === 'Network Error') {
// message = '接口连接异常'
// } else if (message.includes('timeout')) {
// message = '接口请求超时'
// } else if (message.includes('Request failed with status code')) {
// message = '接口' + message.substr(message.length - 3) + '异常'
// }
// reject("系统异常:"+message);
// console.log("系统异常",message)
}
})
})
@ -34,10 +43,11 @@ const instance = axios.create({
instance.interceptors.request.use((config) => {
const { method, params, url } = config
// 附带鉴权的token
const tenantId = 1
// const tenantId = 1
var tenantId = uni.getStorageSync('tenantId')
const headers : any = {
token: getAccessToken(),
"tenant-id":tenantId,
"tenant-id": tenantId,
'Authorization': 'Bearer ' + getAccessToken()
}
if (uni.getStorageSync('openId')) {
@ -66,45 +76,37 @@ instance.interceptors.request.use((config) => {
*
*/
instance.interceptors.response.use((v) => {
const code = v.data?.code || 200
if (code === 401) {
// alert('即将跳转登录页。。。', '登录过期')
// setTimeout(redirectHome, 1500)
removeToken()
uni.showModal({
title: '系统提示',
content: '登录状态已过期,您可以继续留在该页面,或者重新登录',
cancelText: '关闭',
confirmText: '重新登录',
success: function (res) {
if (res.confirm) {
uni.reLaunch({ url: '/pages/login' })
}
if (v) {
if (v.statusCode == 200) {
if (v.data.code == 0) {
// return v.data
return Promise.resolve(v.data)
}else if(v.data.code == 404){
uni.showModal({
title: '系统提示',
content: '登录状态已过期,您可以继续留在该页面,或者重新登录',
cancelText: '关闭',
confirmText: '重新登录',
success: function (res) {
if (res.confirm) {
uni.reLaunch({ url: '/pages/login' })
}
}
})
} else {
// return v.data
return Promise.reject("系统异常:" + v.data.msg)
}
})
return v.data
} else if (code === 500) {
uni.showToast({
title: v.data.msg,
icon: 'none'
})
return v.data
} else if (code !== 200) {
uni.showToast({
title: v.data.msg,
icon: 'none'
})
return v.data
}
// @ts-ignore
if ((v.status || v.statusCode) === 200) {
return v.data
}else{
} else {
return Promise.reject("系统异常:" + v.data.msg)
}
} else {
return Promise.reject("系统异常:" + v.data.msg)
}
return Promise.reject(v)
},error=>{
}, error => {
console.log(error)
uni.showToast({
title: '网络错误',

60
src/api/request2.js

@ -16,6 +16,7 @@ export function login(username, password, code, uuid) {
password,
code,
uuid,
tenantName
}
return http.post('/system/auth/login', data)
}
@ -285,7 +286,7 @@ export function getMesPackInfo(code) {
*
*/
export function getBasicLocationByCode(code) {
var parmas = {
var params = {
code: code,
pageNo: 1,
pageSize: 100
@ -730,7 +731,7 @@ export function cancleTakePutawayJob(id) {
* @param {*} params
*/
export function putawayJobSubmit(params) {
return http.put("/wms/putaway-job-main/execute" + params)
return http.put("/wms/putaway-job-main/execute", params)
}
/**
* 采购上架申请 获取任务列表
@ -1420,6 +1421,14 @@ export function productDismantleJobSubmit() {
export function productDismantleRecordSubmit(params) {
return http.put("/wms/purchasereceipt-job-main/abandon",params)
}
/**
* 拒收接口
* @param {*} id
*
*/
export function productDismantleJobClose(params) {
return http.put("/wms/purchasereceipt-job-main/refusal?id="+params)
}
/**
* 制品发货 任务
* status 任务状态
@ -2118,11 +2127,13 @@ export function productionReturnRecordSubmit(params) {
* @param {*}
*/
export function getUnPlannedIssueRequestList(params) {
return request({
url: baseApi + "/wms/unplannedissue-request-detail/senior",
method: "post",
data: params,
});
// return request({
// url: baseApi + "/wms/unplannedissue-request-detail/senior",
// method: "post",
// data: params,
// });
return http.post("/wms/unplannedissue-request-detail/senior",params)
}
/**
@ -2379,7 +2390,7 @@ export function mergePackageRecordSubmit(params) {
*/
export function overPackageRecordSubmit(params) {
return http.post("/wms/packageover-main/createe" ,params)
return http.post("/wms/packageover-main/create" ,params)
}
/**
@ -2393,6 +2404,21 @@ export function getManagementPrecision(params) {
return http.post("/wms/rule/getPrecisionStrategyByItemCodes" ,params)
}
// 装配收货详情--打印功能
export function getPrintProductReceiptList(params) {
return http.get("/wms/barbasic/getBarbasicByPackingNumber" ,{params})
}
// 根据库存余额获取包装信息进行打印标签 H5
export function getBalanceToPackage(params) {
return http.get("/wms/package/getBalanceToPackage" ,{params})
}
// 批量打印标签 H5
export function batchPrintingLable(params) {
return http.post("/wms/package/batchPrintingLable" ,params)
}
/**
* 查询库存通过多种条件 高级筛选
* @param {*}
@ -2528,6 +2554,20 @@ export function getOverPageJobDetail(id) {
* 翻包任务 提交
* @param {*} params
*/
export function overPageSubmit(params) {
return http.put("/wms/packageover-job-main/execute")
export function overPageSubmit(data) {
return http.put("/wms/packageover-job-main/execute",data)
}
export function getPackageLabel(packageCode) {
var data = {
name: name,
pageNo: 1,
pageSize: 10,
sort:"",
filters:[{
action: "==",
column:"relateNumber",
value: packageCode
}]
}
return http.post("/wms/barbasic/senior",data)
}

8
src/common/balance.js

@ -84,16 +84,19 @@ export function getPrecisionStrategyList(itemList, callback) {
};
getPrecisionStrategy(itemList).then(res => {
console.log(111,res.data)
if (res.data == null) {
result.success = false
result.message = '未查询到管理精度信息'
} else {
result.list = res.data;
}
console.log('haha',result)
callback(result);
}).catch(error => {
result.success = false;
result.message = error;
console.log('hehe',result)
callback(result);
})
}
@ -133,17 +136,21 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
}
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) {
let result = {
list: [],
success: true,
message: ''
};
let params = {
itemCodes: [label.itemCode],
locationCode: locationCode
};
// let jsonParem = JSON.stringify(param)
getManagementPrecision(params).then(res => {
console.log("成功"+res)
let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) {
case 'BY_PACKAGING':
@ -172,6 +179,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento
break;
}
}).catch(error => {
console.log("失败"+error)
let result = {
success: false,
message: error

2
src/common/calc.js

@ -1,5 +1,5 @@
/* 解决js计算精度问题 */
import { Decimal } from 'decimal.js';//引入
import Decimal from 'decimal.js'
class Calc {
add(num1,num2) {
return new Decimal(num1).add(new Decimal(num2)).toNumber()

50
src/common/detail.js

@ -34,8 +34,8 @@ export function getTreeDataSource(dataList) {
items.forEach(r =>
r.subList.forEach(s => {
s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber)
s.packList.forEach(pac=>{
pac.scaned=false;
s.packList.forEach(pac => {
pac.scaned = false;
})
})
)
@ -45,23 +45,23 @@ export function getTreeDataSource(dataList) {
}
export function getDataSource(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
return items;
}
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
return items;
}
export function createItemInfo(detail) {
let item = {
@ -104,8 +104,10 @@ export function calcHandleQty(detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
item.qty = calc.add(item.qty, detail.qty);
}
}
@ -118,10 +120,10 @@ export function calcTreeHandleQty(detailSource) {
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
if(detail.packList.length>0){
if (detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList){
if(pack!=undefined&&pack.scaned){
for (let pack of detail.packList) {
if (pack != undefined && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}

2
src/common/directory.js

@ -568,5 +568,3 @@ export function getPackUnitName(value) {
return resultInfo
}
locationAreaTypeList

5
src/common/record.js

@ -36,6 +36,8 @@ export function createDetailInfo(balance, pack) {
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail;
}
@ -43,10 +45,13 @@ export function createDetailInfo(balance, pack) {
//计算实际数量
export function calcHandleQty(detailSource) {
for (let item of detailSource) {
console.log('qqqqqqqqq')
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
console.log('bbbbbb')
for (let detail of item.subList) {
if(detail!=undefined){
console.log(detail)
if(detail.scaned){
item.handleQty = calc.add(item.handleQty,detail.handleQty);
}

98
src/common/style/new_style.css

@ -184,18 +184,20 @@ uni-page-head .uni-page-head__title {
text-align: center;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
opacity: 0.8;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.scan_float image {
width: 40rpx;
height: 40rpx;
margin-top: 10rpx;
}
.scan_float view {
color: #fff;
font-size: .725rem;
margin-top: -8rpx;
}
.top_card {
@ -218,7 +220,9 @@ uni-page-head .uni-page-head__title {
padding: 0 0rpx;
width: 100%;
box-sizing: border-box;
float: left;
background:#EEF4FA;
padding:20rpx;
border-radius: 10rpx;
}
.cell_box {
@ -231,6 +235,7 @@ uni-page-head .uni-page-head__title {
padding: 0 20rpx;
/* margin: 0 0 20rpx; */
text-align: center;
flex:1
}
.cell_box .cell_long {
@ -240,7 +245,8 @@ uni-page-head .uni-page-head__title {
.cell_box .cell_info view {
font-size: 0.9375rem;
margin-bottom: 10rpx;
color: #7B8195;
color: #515562;
word-wrap:break-word
}
.cell_box .cell_info .text_black {
@ -310,7 +316,7 @@ uni-page-head .uni-page-head__title {
}
.cen_card .cell_box .cell_info .text_lightblue {
font-size: 0.925rem;
font-size:26rpx;
}
.bot_card {
@ -1394,13 +1400,13 @@ uni-page-head .uni-page-head__title {
}
.msg_list {
padding-top: 20rpx;
}
.msg_list .uni-list-chat__header {
.msg_list ::v-deep .u-card__head--left__thumb{
width: 60rpx !important;
height: 60rpx !important;
background-color: #3d7eff;
padding:12rpx;
background-color: #3d7eff!important;
border-color: transparent !important;
border-radius: 6rpx !important;
}
@ -1426,9 +1432,8 @@ uni-page-head .uni-page-head__title {
.msg_list .uni-list-chat__content-title {
font-size: .9rem !important;
}
.msg_list .hasread .uni-list-chat__header {
background-color: #ccc;
::v-deep .msg_list .hasread .u-card__head--left__thumb {
background-color: #ccc!important;
}
/* index */
@ -2031,9 +2036,8 @@ button::after {
}
.card_itemCode {
font-size: 38rpx;
font-size: 32rpx;
font-weight: bold;
font-weight: 500;
/* padding: 5rpx 10rpx; */
/* width: 210rpx; */
word-wrap: break-word;
@ -2042,7 +2046,7 @@ button::after {
.card_itemName {
color: #909399;
font-size: 30rpx;
font-size: 26rpx;
/* padding: 5rpx 10rpx; */
/* width: 210rpx; */
word-wrap: break-word;
@ -2070,23 +2074,27 @@ button::after {
.card_content {
font-size: 32rpx;
padding: 5px;
color:#2E3A63;
margin-left:20rpx
}
.card_icon_normal {
width: 45rpx;
height: 45rpx;
vertical-align: middle
width: 30rpx;
height: 30rpx;
vertical-align: middle;
margin-right:12rpx
}
.card_packing_code {
color: #3315EB;
padding: 5px;
color: #1677FF;
font-size: 26rpx;
font-style: italic;
}
.card_batch {
color: #9747FF;
padding: 5px;
font-size: 26rpx;
font-style: italic;
}
.card_container {
@ -2101,23 +2109,23 @@ button::after {
}
.card_business {
color: #F1A532;
padding: 5px;
color: #F1A532; font-size: 26rpx; font-style: italic;
}
.card_business_content {
font-size: 32rpx;
padding: 5px;
font-size: 32rpx; color:#2E3A63; margin-left:20rpx
}
.card_location {
color: #DA8910;
padding: 5px;
font-size: 26rpx;
font-style: italic;
}
.card_to_location {
color: #329362;
padding: 5px;
font-size: 26rpx;
font-style: italic;
}
.card_location_content {
@ -2151,12 +2159,14 @@ button::after {
.scan_view {
/* #0CC2B6 20% */
background: linear-gradient(90deg, rgba(12, 194, 182, 0.2) 0%, rgba(12, 194, 182, 0) 100%)
background: linear-gradient(90deg, rgba(12, 194, 182, 0.2) 0%, rgba(12, 194, 182, 0.05) 100%);
border-radius:14rpx;
padding:10rpx 20rpx 16rpx
}
.card_view {
font-size: 32rpx;
padding: 5rpx;
margin-top:14rpx
}
/*
@ -2199,30 +2209,28 @@ button::after {
.task_top {
margin: 0rpx 10rpx;
background-color: #fff;
vertical-align: middle;
}
.task_item {
margin: 0rpx 10rpx;
margin-top: 10rpx;
background-color: #fff;
padding:20rpx 0px
}
.task_card {
padding: 12rpx;
padding:0px 20rpx;
background-color: #fff;
border-radius: 10rpx;
margin: 12rpx;
}
.task_number {
font-size: 35rpx;
font-size: 36rpx;
font-weight: 600;
/* bold */
}
.task_text {
font-size: 30rpx;
margin: 5rpx 0rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -2281,21 +2289,22 @@ button::after {
background-color: #fff;
width: 100%;
border-radius: 8rpx 8rpx 0rpx 0rpx;
padding: 15rpx;
padding:0px 30rpx;
}
.pop_detail .item {
padding-top: 5rpx;
padding-bottom: 5rpx;
margin-left: 10rpx;
margin-right: 10rpx;
/* margin-left: 10rpx; */
/* margin-right: 10rpx; */
display: flex;
flex-direction: row;
-webkit-justify-content: space-between;
justify-content: space-between;
align-items:center
}
.pop_detail .item_title {
@ -2460,7 +2469,7 @@ button[disabled] {
.center {
display: flex;
flex-direction: row;
justify-content: center;
justify-content: flex-end;
align-items: center;
}
@ -2473,6 +2482,7 @@ button[disabled] {
.text_recommend {
color: #0A84FF;
font-size: 38rpx;
font-weight:bold
}
.text_balance {
@ -2506,7 +2516,7 @@ button[disabled] {
align-items: center;
padding: 0px;
color: #909399;
font-size: 30rpx;
font-size:26rpx;
}
.std_uom {
@ -2518,7 +2528,7 @@ button[disabled] {
.uom {
color: #909399;
font-size: 30rpx;
font-size: 26rpx;
margin-left: 5rpx;
margin-right: 5rpx;
display: flex;
@ -2667,8 +2677,9 @@ button[disabled] {
align-self: stretch;
/* 颜色/白色 */
background: #FFFFFF;
background:rgba(60, 156, 255, 1);
box-sizing: border-box;
color:white;
/* 颜色/边框 */
border: 1px solid #E7E6E4;
z-index: 3;
@ -2774,7 +2785,6 @@ button[disabled] {
}
.split_line {
background-color: #e0e0e0;
background-color: rgba(230,230,230,0.5);
height: 1px;
margin: 10rpx;
}

48
src/common/style/pdabasic.css

@ -253,7 +253,6 @@
font-size: 28rpx;
background: rgba(95, 203, 148, 0.2);
color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
@ -282,8 +281,9 @@
/* 关闭 */
.other {
background-color: #808080;
color: #FFFFFF;
/* background-color: #808080; */
color: #b4a5ff;
font-size: 26rpx;
border-radius: 10rpx;
}
@ -329,16 +329,19 @@
.inventory_status_insp {
color: #F9AE3D;
margin-right: 10rpx;
font-size:26rpx
}
.inventory_status_ok {
color: #67C23A;
margin-right: 10rpx;
font-size:26rpx
}
.inventory_status_nok {
color: #FF2424;
margin-right: 10rpx;
font-size:26rpx
}
.inventory_status_hold {
@ -480,10 +483,9 @@ export function getItemTypeStyle(val) {
.detail-list {
background-color: #fff;
padding:5rpx 10rpx;
/* margin: 20rpx; */
/* border-radius: 16rpx; */
/* overflow: hidden; */
margin:20rpx 20rpx;
padding:0px 20rpx;
border-radius: 16rpx;
}
.detail-content {
@ -721,19 +723,27 @@ page {
flex-direction: column;
width: 100%;
height: 100%;
/* background-color: #fff; */
background-color: #f5f5f5;
}
.page-header {
background-color: #fff;
background-color: rgb(60, 156, 255) !important;
font-size: 35rpx;
padding: 10rpx 20rpx;
padding: 10rpx 20rpx 20rpx;
}
.page-header-box{
background-color: #fff !important;
padding:0px 20rpx 20rpx;
border-radius: 12rpx;
}
.page-header .header_item {
/* padding-left: 10rpx; */
padding: 5rpx 10rpx;
font-size:32rpx ;
font-size:28rpx ;
color:#777E94;
}
.page-header .header_item text{
color:#011C43;
}
.page-header .header_job_top {
@ -742,7 +752,6 @@ page {
.page-main {
flex: 1;
position: relative;
background: #fff;
}
.page-main-scroll {
@ -760,3 +769,16 @@ page {
background: #e0e0e0;
}
.choose-box1{
background: white;
padding:10rpx 20rpx
}
.choose-item1{
border: 1px solid rgba(230, 230, 230, 1);
padding: 20rpx;
display: flex
}
.choose-text1{
flex:1
}

292
src/components/my-paging/my-paging.vue

@ -1,157 +1,159 @@
<!-- 基于z-paging封装个性化分页组件演示可减少大量重复代码 -->
<template>
<!-- 这边统一设置z-paging在页面中使用时就不用重复写 -->
<!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query -->
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 -->
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList"
:useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps"
:loading-more-loading-text="{'en':'英文的加载中','zh-cn':'中文的加载中','zh-hant-cn':'繁体的加载中'}">
<!-- 这边统一设置z-paging在页面中使用时就不用重复写 -->
<!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query -->
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 -->
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :loading-more-loading-text="{ en: '英文的加载中', 'zh-cn': '中文的加载中', 'zh-hant-cn': '繁体的加载中' }">
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 -->
<template #top>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" -->
<slot name="top" />
</template>
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 -->
<template #top>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" -->
<slot name="top" />
</template>
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为bottom固定在顶部 -->
<!-- vue3中用v-slot:bottom -->
<template #bottom>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="bottom" -->
<slot name="bottom" />
</template>
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为bottom固定在顶部 -->
<!-- vue3中用v-slot:bottom -->
<template #bottom>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="bottom" -->
<slot name="bottom" />
</template>
<template #empty v-if="$slots.empty">
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="empty" -->
<slot name="empty" />
</template>
<template #empty v-if="$slots.empty" >
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="empty" -->
<slot name="empty" />
</template>
<!-- 这个是插入虚拟列表/内置列表的cell -->
<template #cell="{ item, index }">
<slot name="cell" :item="item" :index="index" />
</template>
<!-- 这个是插入虚拟列表/内置列表的cell -->
<template #cell="{item,index}">
<slot name="cell" :item="item" :index="index"/>
</template>
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view页面那边就不用再写下面两行了 -->
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) -->
<template #refresher="{ refresherStatus }">
<!-- <custom-refresher :status="refresherStatus" /> -->
</template>
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> -->
<u-loadmore status="normore" />
</template>
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view页面那边就不用再写下面两行了 -->
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) -->
<template #refresher="{refresherStatus}">
<!-- <custom-refresher :status="refresherStatus" /> -->
</template>
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> -->
<uni-load-more status="normore" />
</template>
<!-- 这里接收页面传进来的普通slot如列表数据等 -->
<slot />
</z-paging>
<!-- 这里接收页面传进来的普通slot如列表数据等 -->
<slot />
</z-paging>
</template>
<script>
export default {
name: "my-paging",
data() {
return {
list: []
};
},
props: {
//v-modellist
value: {
type: Array,
default: function() {
return [];
}
},
//使
useVirtualList: {
type: Boolean,
default: false
},
//z-paging()use-virtual-listtruetrue
useInnerList: {
type: Boolean,
default: false
},
//cellkeynvuenvueuse-inner-list
cellKeyName: {
type: String,
default: ''
},
//innerList
innerListStyle: {
type: Object,
default: function() {
return {};
}
},
//()127celldom()
preloadPage: {
type: [Number, String],
default: 12
},
//cellfixedcellcelldynamicdynamicfixed
cellHeightMode: {
type: String,
default: 'fixed'
},
//scroll60
virtualScrollFps: {
type: [Number, String],
default: 60
},
},
watch: {
//v-modez-paging
value(newVal) {
this.list = newVal;
},
// #ifdef VUE3
modelValue(newVal) {
this.list = newVal;
},
// #endif
//z-paging
list(newVal) {
//emit inputv-model
this.$emit('input', newVal);
// #ifdef VUE3
this.$emit('update:modelValue', newVal);
// #endif
}
},
methods: {
//z-paging@queryemit
queryList(pageNo, pageSize) {
console.log("queryList",pageNo)
// this.$emit('query', pageNo, pageSize);
},
//reloadz-paging
reload(data) {
this.$refs.paging.reload(data);
},
//completez-paging
complete(data) {
this.$refs.paging.complete(data);
},
/*
//使mixins使
//updatePageScrollTopz-paging
updatePageScrollTop(data){
this.$refs.paging.updatePageScrollTop(data);
},
//pageReachBottomz-paging
pageReachBottom(){
this.$refs.paging.pageReachBottom();
},
//doChatRecordLoadMorez-paging
doChatRecordLoadMore() {
this.$refs.paging.doChatRecordLoadMore();
}
*/
}
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
const props = defineProps({
value: {
type: Array,
default() {
return []
}
},
// 使
useVirtualList: {
type: Boolean,
default: false
},
// z-paging()use-virtual-listtruetrue
useInnerList: {
type: Boolean,
default: false
},
// cellkeynvuenvueuse-inner-list
cellKeyName: {
type: String,
default: ''
},
// innerList
innerListStyle: {
type: Object,
default() {
return {}
}
},
// ()127celldom()
preloadPage: {
type: [Number, String],
default: 12
},
// cellfixedcellcelldynamicdynamicfixed
cellHeightMode: {
type: String,
default: 'fixed'
},
// scroll60
virtualScrollFps: {
type: [Number, String],
default: 60
}
})
const list = ref([])
const paging = ref()
// v-modez-paging
watch(
() => props.value,
(newVal) => {
list.value = newVal
}
)
// #ifdef VUE3
watch(
() => props.modelValue,
(newVal) => {
list.value = newVal
}
)
// #endif
watch(
() => list.value,
(newVal) => {
// emit inputv-model
emit('input', newVal)
// #ifdef VUE3
emit('update:modelValue', newVal)
// #endif
}
)
// z-paging@queryemit
const queryList = (pageNo, pageSize) => {
console.log('queryList', pageNo)
// this.$emit('query', pageNo, pageSize);
}
// reloadz-paging
const reload = (data) => {
paging.value.reload(data)
}
// completez-paging
const complete = (data) => {
paging.value.complete(data)
}
/*
//使mixins使
//updatePageScrollTopz-paging
updatePageScrollTop(data){
this.$refs.paging.updatePageScrollTop(data);
},
//pageReachBottomz-paging
pageReachBottom(){
this.$refs.paging.pageReachBottom();
},
//doChatRecordLoadMorez-paging
doChatRecordLoadMore() {
this.$refs.paging.doChatRecordLoadMore();
}
*/
//
const emit = defineEmits(['input', 'update:modelValue'])
defineExpose({
reload,
complete
})
</script>
<style>
</style>
<style></style>

192
src/manifest.json

@ -1,82 +1,114 @@
{
"name" : "富维汽车镜",
"appid" : "__UNI__DA78BC9",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"ad" : {}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx6176535b0b0153f0",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3",
"h5" : {
"template" : "index.html",
"devServer" : {
"port" : 9020
}
}
"name": "富维汽车镜",
"appid": "__UNI__DA78BC9",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules": {},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios": {
"dSYMs": false
},
/* SDK */
"sdkConfigs": {
"ad": {}
},
"nativePlugins": {
"TestModule": {
"__plugin_info__": {
"name": "TestModule",
"description": "打印",
"platforms": "Android",
"url": "",
"android_package_name": "",
"ios_bundle_id": "",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {}
}
}
}
},
"nativePlugins": {
"TestModule": {
"__plugin_info__": {
"name": "TestModule",
"description": "打印",
"platforms": "Android",
"url": "",
"android_package_name": "",
"ios_bundle_id": "",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {}
}
}
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "wx6176535b0b0153f0",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "3",
"h5": {
"template": "index.html",
"devServer": {
"port": 9020
}
}
}

224
src/mycomponents/balance/balance.vue

@ -1,149 +1,95 @@
<template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; ">
<view class="uni-flex uni-row space-between" style="align-items: center">
<view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode">
</to-location>
</view>
<view class="uni-flex uni-row center">
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
<view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
</view>
<view class="uni-flex uni-row u-align-start">
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)"
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack"
:isShowStatus='isShowStatus'>
</compare-qty>
<qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; width: 20px;" @click="copy">复制</text>
</view>
</view>
</view>
<!-- <u-line></u-line> -->
</view>
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view>
</view>
</view>
<!-- <u-line></u-line> -->
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
pack,
location,
toLocation,
batch,
qty,
recommendQty,
compareQty,
},
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
data() {
return {
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
}
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
}
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
},
watch: {
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
}
const isDevlement = () => {
return config.isDevelopment
}
</script>
<style>
</style>
<style></style>

51
src/mycomponents/balance/balanceSelect.vue

@ -1,7 +1,7 @@
<!--发料任务卡片-->
<template>
<!-- <page-meta root-font-size="18px"></page-meta> -->
<uni-popup ref="popupItems" type="center">
<u-popup v-model='show' mode='center'>
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;">
<item :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;"
@ -9,45 +9,28 @@
<balance :dataContent="item"></balance>
</view>
</scroll-view>
</uni-popup>
</u-popup>
</template>
<script>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
} from 'vue'
import item from '@/mycomponents/item/item.vue'
import balance from '@/mycomponents/balance/balance.vue'
const balanceItems = ref([])
const openPopup = (items) => {
balanceItems.value = items;
show.value = true
}
export default {
name: "balanceSelect",
emits: ['onSelectItem'],
components: {
item,
balance
},
data() {
return {
balanceItems: [],
};
},
//
props: {
// datacontent: {
// type: Object,
// value: null
// }
},
methods: {
openPopup(items) {
this.balanceItems = items;
this.$refs['popupItems'].open("center");
},
callback(item) {
this.$emit("onSelectItem", item);
this.$refs['popupItems'].close();
},
}
const callback = (item) => {
emit("onSelectItem", item);
show.value = false
}
const emit = defineEmits(['onSelectItem'])
defineExpose({openPopup})
</script>
<style scoped lang="scss">

26
src/mycomponents/balance/batch.vue

@ -1,23 +1,17 @@
<template>
<view class="card_view ">
<text class="card_batch card_content ">批次</text>
<text class="card_content ">{{batch}}</text>
<view class="card_view">
<text class="card_batch">批次</text>
<text class="card_content">{{batch}}</text>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
batch: {
type: String,
default: ""
}
},
}
<script setup lang="ts">
const props = defineProps({
batch: {
type: String,
default: ""
}
})
</script>
<style>

51
src/mycomponents/balance/bussinessType.vue

@ -1,37 +1,26 @@
<template>
<view class="business_view">
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text>
<text class="card_business_content">{{number}}</text>
</view>
<view class="card_view">
<text class="card_business">{{ businessTypeDesc(bussinessType) }}</text>
<text class="card_business_content">{{ number }}</text>
</view>
</template>
<script>
import {
getBusinessTypeDesc
} from '@/common/directory.js';
export default {
data() {
return {}
},
props: {
bussinessType: {
type: String,
default: ""
},
number: {
type: String,
default: ""
}
},
methods:{
businessTypeDesc(type){
return getBusinessTypeDesc(type)
}
<script setup lang="ts">
import { getBusinessTypeDesc } from '@/common/directory.js'
}
}
const props = defineProps({
bussinessType: {
type: String,
default: ''
},
number: {
type: String,
default: ''
}
})
const businessTypeDesc = (type) => {
return getBusinessTypeDesc(type)
}
</script>
<style>
</style>
<style></style>

128
src/mycomponents/balance/handleBalance.vue

@ -1,83 +1,59 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="space_between center">
<view style="word-break: break-all;width: 60%;">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view style="word-break: break-all;">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" :isShowStatus='isShowStatus'
:isShowStdPack="true"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus='isShowStatus'
:isShowStdPack="true">
</compare-qty>
</view>
</view>
</view>
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff">
<view class="space_between center">
<view style="word-break: break-all; width: 60%">
<pack title="外包装" v-if="detail.parentPackingNumber != undefined && detail.parentPackingNumber != ''" :packingCode="detail.parentPackingNumber"></pack>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view style="word-break: break-all">
<recommend-qty v-if="detail.record == null || detail.record == undefined" :dataContent="detail" :isShowStatus="isShowStatus" :isShowStdPack="true"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus="isShowStatus" :isShowStdPack="true"> </compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
const props = defineProps({
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
}
})
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

30
src/mycomponents/balance/location.vue

@ -1,30 +1,22 @@
<template>
<view class="card_view ">
<text class="card_location card_content ">{{title}}</text>
<view class="card_view">
<text class="card_location">{{title}}</text>
<text class="card_content ">{{locationCode}}</text>
</view>
</template>
<script>
export default {
components: {
<script setup lang="ts">
const props = defineProps({
locationCode: {
type: String,
default: ''
},
data() {
return {}
title: {
type: String,
default: '库位'
},
props: {
locationCode: {
type: String,
default: ''
},
title: {
type: String,
default: '库位'
},
},
}
})
</script>
<style>

45
src/mycomponents/balance/pack.vue

@ -1,34 +1,21 @@
<template>
<view class="card_view">
<text class="card_packing_code card_content ">包装</text>
<text class="card_content ">{{packingCode}}</text>
</view>
<view class="card_view">
<text class="card_packing_code card_content">{{ title }}</text>
<text class="card_content">{{ packingCode }}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
props: {
packingCode: {
type: String,
default: ''
},
},
watch: {
},
methods: {
}
}
<script setup lang="ts">
const props = defineProps({
packingCode: {
type: String,
default: ''
},
title: {
type: String,
default: '包装'
}
})
</script>
<style>
</style>
<style></style>

87
src/mycomponents/balance/productionLabel.vue

@ -1,59 +1,40 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowFromLocation="isShowLocation"></balance>
<production-info :dataContent="packageContent"></production-info>
</view>
<view :class="dataContent.scaned ? 'scan_view' : ''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance>
<production-info :dataContent="packageContent"></production-info>
</view>
</template>
<script>
import balance from '@/mycomponents/balance/balance.vue'
import productionInfo from '@/mycomponents/production/productionInfo.vue'
<script setup lang="ts">
import balance from '@/mycomponents/balance/balance.vue'
import productionInfo from '@/mycomponents/production/productionInfo.vue'
export default {
components: {
balance,
productionInfo
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
packageContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
}
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
packageContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
})
</script>
<style>
</style>
<style></style>

126
src/mycomponents/balance/recommendBalance.vue

@ -1,84 +1,56 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;">
<view class="uni-flex uni-row space-between center ">
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" >
<view style=" width: 25rpx;color: #32C1E8;">
推荐
</view>
<view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
<view style="word-break: break-all">
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false">
</compare-qty>
</view>
</view>
</view>
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #fff">
<view class="uni-flex uni-row space-between center">
<view class="uni-flex uni-row" style="width: 60%">
<view style="width: 20rpx; color: #1677ff; margin-right: 20rpx; font-size: 24rpx"> 推荐 </view>
<view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
<view style="word-break: break-all">
<recommend-qty v-if="detail.Records == null || detail.Records.length == 0" :dataContent="detail" :isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> </compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
const props = defineProps({
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
}
})
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

28
src/mycomponents/balance/toLocation.vue

@ -1,30 +1,20 @@
<template>
<view class="card_view ">
<text class="card_to_location card_content ">{{title}}</text>
<text class="card_to_location">{{title}}</text>
<text class="card_content ">{{locationCode}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {}
<script setup lang="ts">
const props = defineProps({
locationCode: {
type: String,
},
props: {
locationCode: {
type: String,
default: ''
},
title: {
type: String,
default: '库位'
},
title: {
type: String,
default: '库位'
},
}
})
</script>
<style>

74
src/mycomponents/button/requestButton.vue

@ -4,53 +4,43 @@
<image src="@/static/icons_ui/icon_add.svg"></image>
<view>{{btnName}}</view>
</view>
<!-- <movable-area>
<movable-view class="max" direction="all">扫描</movable-view>
</movable-area> -->
</view>
</template>
<script>
export default {
data() {
return {
x: 0,
y: 0,
old: {
x: 0,
y: 0
}
}
},
props: {
btnName: {
type: String,
default: '创建'
},
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
},
tap: function(e) {
this.x = this.old.x
this.y = this.old.y
this.$nextTick(function() {
this.x = 30
this.y = 30
})
},
onChange: function(e) {
this.old.x = e.detail.x
this.old.y = e.detail.y
}
<script setup lang="ts">
import {
ref,
nextTick
} from 'vue'
const props = defineProps({
btnName: {
type: String,
default: '创建'
},
})
const x = ref(0)
const y = ref(0)
const old= ref({
x: 0,
y: 0
})
const goScan=(content)=> {
emit("goScan", '');
}
const tap=(e) =>{
x.value = old.value.x
y.value = old.value.y
nextTick(function() {
x.value = 30
y.value = 30
})
}
const onChange=(e) =>{
old.value.x = e.detail.x
old.value.y = e.detail.y
}
//
const emit = defineEmits(['goScan'])
</script>
<style>

46
src/mycomponents/common/comBlankView.vue

@ -1,31 +1,25 @@
<template>
<view class="default_goscan">
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image>
<button @click="goScan">
<image src="@/static/icons_ui/icon_add.svg"></image>
去扫描
</button>
</view>
<view class="default_goscan">
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image>
<button @click="goScan">
<image src="@/static/icons_ui/icon_add.svg"></image>
{{ title }}
</button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
}
}
}
<script setup lang="ts">
const props = defineProps({
title: {
type: String,
default: '去扫描'
}
})
const goScan = (content) => {
emit('goScan', '')
}
//
const emit = defineEmits(['goScan'])
</script>
<style>
</style>
<style></style>

27
src/mycomponents/common/comEmptyView.vue

@ -4,36 +4,11 @@
<view class="">
<image class="default_nodata" src="@/static/icons_ui/default_data.png"></image>
</view>
<!--
<view class="" style="display: flex;flex-direction: column;
align-items: center;">
<view class="" >
<image class="nodata" src="/static/icons_ui/default_data.png"></image>
</view>
<view style="font-size: 40rpx;color: #909193;">
暂无数据
</view>
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
<script setup lang="ts">
}
}
</script>

122
src/mycomponents/common/comListItem.vue

@ -1,27 +1,25 @@
<template>
<view class="">
<view class="uni-flex uni-column">
<view class="item" v-for="(item,index) in dataList">
<text class="item_title">{{item.title}} : </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{getTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{getUomInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{getInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{getSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{getRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{getInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{getLocationTypeName(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{handleGetTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{handleGetUomInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{handleGetInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{handleGetSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{handleGetRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{handleGetInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{handleGetLocationTypeName(item.content)}} </text>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {
dateFormat
} from '@/common/basic.js';
@ -38,69 +36,49 @@
getLocationTypeName
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
watch: {
// dataContent: {
// handler(newName, oldName) {
// },
// immediate: true,
// deep: true
// }
},
props: {
dataList: {
type: Array,
default: []
}
},
methods: {
avaliable(value) {
return value == "TRUE" ? "可用" : "不可用"
},
boolean(value) {
return value == "TRUE" ? "是" : "否"
},
formatDate(val) {
return dateFormat(val)
},
getTransferModeName(value){
return getTransferModeName(value)
},
getLocationTypeNameList(value){
return getLocationTypeNameList(value)
},
getDirectoryItemArray(value){
return getDirectoryItemArray(value)
},
getUomInfo(value){
return getUomInfo(value).label
},
getInspectType(value){
return getInspectType(value)
},
getSampleMethod(value){
return getSampleMethod(value)
},
getRequestStateInfo(value){
return getRequestStateInfo(value).label
},
getInventoryStatusName(value){
return getInventoryStatusName(value)
},
getLocationTypeName(value){
return getLocationTypeName(value)
}
const props = defineProps({
dataList: {
type: Array,
default: []
}
})
const avaliable=(value)=> {
return value == "TRUE" ? "可用" : "不可用"
}
const boolean=(value)=> {
return value == "TRUE" ? "是" : "否"
}
const formatDate=(val)=> {
return dateFormat(val)
}
const handleGetTransferModeName=(value)=>{
return getTransferModeName(value)
}
const handleGetLocationTypeNameList=(value)=>{
return getLocationTypeNameList(value)
}
const handleGetDirectoryItemArray=(value)=>{
return getDirectoryItemArray(value)
}
const handleGetUomInfo=(value)=>{
return getUomInfo(value).label
}
const handleGetInspectType=(value)=>{
return getInspectType(value)
}
const handleGetSampleMethod=(value)=>{
return getSampleMethod(value)
}
const handleGetRequestStateInfo=(value)=>{
return getRequestStateInfo(value).label
}
const handleGetInventoryStatusName=(value)=>{
return getInventoryStatusName(value)
}
const handleGetLocationTypeName=(value)=>{
return getLocationTypeName(value)
}
</script>
<style>

938
src/mycomponents/common/comMessage.vue

@ -1,470 +1,482 @@
<template name="show-modal">
<view>
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false"
:showConfirmButton="false" ref="modal">
<view class="slot-content">
<slot name="icon">
<image class="icon" :src="icon" />
</slot>
<slot name="content">
<rich-text class="content" :nodes="content">
</rich-text>
</slot>
<view class='split_line'></view>
<slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text>
</view>
<u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose">
<text :style="{'color':confirmColor}">{{confirmText}}</text>
<text v-if="showConfirmCountdown">({{seconds}}s关闭)</text>
</view>
</view>
</slot>
</view>
</u-modal>
</view>
<view>
<u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
<view class="slot-content">
<slot name="icon">
<image class="icon" :src="icon" />
</slot>
<slot name="content">
<rich-text class="content" :nodes="content"> </rich-text>
</slot>
<view class="split_line"></view>
<slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view>
<u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose">
<text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view>
</view>
</slot>
</view>
</u-modal>
</view>
</template>
<script setup lang="ts">
/**
* modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */
import {
ref,
getCurrentInstance
} from 'vue'
const timer = ref(null)
const show = ref(false) //
const iconType = ref('消息')
const icon = ref('../../static/icons/error-circle.svg')
const title = ref('')
const content = ref('') //
const cancelText = ref('取消') //
const confirmText = ref('确定') //
const showCancel = ref(true) // true
const confirmColor = ref('#007aff') //
const cancelColor = ref(null) //
const showConfirmButton = ref(true) //
const showConfirmCountdown = ref(true) //
const showCancelButton = ref(true) //
const showClose = ref(false)
const confirm = ref(false) // true
const cancel = ref(false) // true
const isDisabled = ref(true) // true
const seconds = ref(0)
const success = () => {
}
const open = () => {
show.value = true;
isDisabled.value = true;
}
const close = () => {
show.value = false
isDisabled.value = false;
}
const confirmClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
// console.log('')
if (show.value) {
show.value = false;
clearInterval(timer.value) //timer
success({
// cancel: false,
confirm: true,
});
}
}
const cancelClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
clearInterval(timer.value) //timer
show.value = false
success({
// cancel: true,
confirm: false,
});
}
// (+)
const showMessage = (mContent, callback) => {
showConfirmCountdownModal("消息", mContent, callback);
}
// (+)
const showSuccessMessage = (mContent, callback) => {
showConfirmCountdownModal("成功", mContent, callback);
}
// (
const showErrorMessage = (mContent, callback) => {
console.log(333)
showConfirmModal("失败", mContent, callback);
}
// (
const showBreakMessage = (mContent, callback) => {
showNoButtonModal("失败", mContent, callback);
}
// (+
const showQuestionMessage = (mContent, callback) => {
showSelectModal("疑问", mContent, callback);
}
// (+)
const showWarningMessage = (mContent, callback) => {
showConfirmCountdownModal("警告", mContent, callback);
}
// (+)
const showConfirmCountdownFailModal = (mContent, callback) => {
showConfirmCountdownModal("失败", mContent, callback);
}
// (
const showConfirmMessageModal = (mContent, callback) => {
showConfirmModal("消息", mContent, callback);
}
// (
const showConfirmSuccessModall = (mContent, callback) => {
showConfirmModal("成功", mContent, callback);
}
// (
const showConfirmWarningModal = (mContent, callback) => {
showConfirmModal("警告", mContent, callback);
}
// (
const showConfirmQuestionModal = (mContent, callback) => {
showConfirmModal("疑问", mContent, callback);
}
// (
const showNoButtonModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showConfirmButton: false,
showCancelButton: false,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
} else {
callback(false);
}
}
}
});
}
// (
const showConfirmModal = (mIconType, mContent, callback) => {
console.log(222)
showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
} else {
callback(false);
}
}
}
});
}
// (+
const showSelectMessageModal = (mContent, callback) => {
showSelectModal("消息", mContent, callback);
}
// (+
const showSelectSuccessModal = (mContent, callback) => {
showSelectModal("成功", mContent, callback);
}
// (+
const showSelectFailModal = (mContent, callback) => {
showSelectModal("失败", mContent, callback);
}
// (+
const showSelectWarningModal = (mContent, callback) => {
showSelectModal("警告", mContent, callback);
}
// (+
const showSelectModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
}
// (+)
const showConfirmCountdownQuestionModal = (mContent, callback) => {
showConfirmCountdownModal("疑问", mContent, callback);
}
// (+)
const showConfirmCountdownModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
showConfirmCountdown: true,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
} else {
callback(false);
}
}
}
});
}
// (++)
const showSelectCountdownMessageModal = (mContent, callback) => {
showSelectCountdownModal("消息", mContent, callback);
}
// (++)
const showSelectCountdownSuccessModal = (mContent, callback) => {
showSelectCountdownModal("成功", mContent, callback);
}
// (++)
const showSelectCountdownFailModal = (mContent, callback) => {
showSelectCountdownModal("失败", mContent, callback);
}
// (++)
const showSelectCountdownWarningModal = (mContent, callback) => {
showSelectCountdownModal("警告", mContent, callback);
}
// (++)
const showSelectCountdownQuestionModal = (mContent, callback) => {
showSelectCountdownModal("疑问", mContent, callback);
}
// (++)
const showSelectCountdownModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showConfirmCountdown: true,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
}
//
const showModal = (data) => {
if (data.iconType) {
iconType.value = data.iconType
switch (data.iconType) {
case '消息':
icon.value = '/static/icons/error-circle.svg';
break;
case '成功':
icon.value = '/static/icons/checkmark-circle.svg';
break;
case '失败':
icon.value = '/static/icons/close-circle.svg';
break;
case '警告':
icon.value = '/static/icons/warning.svg';
break;
case '疑问':
icon.value = '/static/icons/question-circle.svg';
break;
default:
break;
}
}
// image
if (data.title) {
title.value = data.title
}
if (data.content) {
content.value = data.content
} else {
content.value = ''
}
if (data.cancelText) {
cancelText.value = data.cancelText
} else {
cancelText.value = '取消'
}
if (data.confirmText) {
confirmText.value = data.confirmText
} else {
confirmText.value = '确定'
}
if (data.showCancel === false || data.showCancel === true) {
showCancel.value = data.showCancel
} else {
showCancel.value = true
}
if (data.confirmColor) {
confirmColor.value = data.confirmColor
} else {
confirmColor.value = '#007aff'
}
if (data.cancelColor) {
cancelColor.value = data.cancelColor
} else {
cancelColor.value = '#666F83'
}
if (data.showConfirmButton === false || data.showConfirmButton === true) {
showConfirmButton.value = data.showConfirmButton
} else {
showConfirmButton.value = true
}
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) {
showConfirmCountdown.value = data.showConfirmCountdown
} else {
showConfirmCountdown.value = false
}
if (data.showCancelButton === false || data.showCancelButton === true) {
showCancelButton.value = data.showCancelButton
} else {
showCancelButton.value = true
}
if (data.success) {
success = data.success
} else {
success = () => {}
}
setTimeout(res => {
open();
}, 500)
if (showConfirmCountdown.value) {
startTimer();
}
}
const startTimer = () => {
seconds.value = 3;
clearInterval(timer.value)
timer.value = setInterval(() => {
seconds.value--
// console.log("", this.seconds);
if (seconds.value <= 0) {
timeUp()
return
}
}, 1000)
}
const timeUp = () => {
// clearInterval(this.timer)
console.log('时间到')
confirmClose();
}
defineExpose({ showErrorMessage }) // open
/**
* modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */
import { ref, getCurrentInstance } from 'vue'
const timer = ref(null)
const show = ref(false) //
const iconType = ref('消息')
const icon = ref('../../static/icons/error-circle.svg')
const title = ref('')
const content = ref('') //
const cancelText = ref('取消') //
const confirmText = ref('确定') //
const showCancel = ref(true) // true
const confirmColor = ref('#007aff') //
const cancelColor = ref(null) //
const showConfirmButton = ref(true) //
const showConfirmCountdown = ref(true) //
const showCancelButton = ref(true) //
const showClose = ref(false)
const confirm = ref(false) // true
const cancel = ref(false) // true
const isDisabled = ref(true) // true
const seconds = ref(0)
const success = ref(() => {})
const open = () => {
show.value = true
isDisabled.value = true
}
const close = () => {
show.value = false
isDisabled.value = false
}
const confirmClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
// console.log('')
if (show.value) {
show.value = false
clearInterval(timer.value) // timer
success.value({
// cancel: false,
confirm: true
})
}
}
const cancelClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
clearInterval(timer.value) // timer
show.value = false
success.value({
// cancel: true,
confirm: false
})
}
// (+)
const showMessage = (mContent, callback) => {
showConfirmCountdownModal('消息', mContent, callback)
}
// (+)
const showSuccessMessage = (mContent, callback) => {
showConfirmCountdownModal('成功', mContent, callback)
}
// (
const showErrorMessage = (mContent, callback) => {
showConfirmModal('失败', mContent, callback)
}
// (
const showBreakMessage = (mContent, callback) => {
showNoButtonModal('失败', mContent, callback)
}
// (+
const showQuestionMessage = (mContent, callback) => {
showSelectModal('疑问', mContent, callback)
}
// (+)
const showWarningMessage = (mContent, callback) => {
showConfirmCountdownModal('警告', mContent, callback)
}
// (+)
const showConfirmCountdownFailModal = (mContent, callback) => {
showConfirmCountdownModal('失败', mContent, callback)
}
// (
const showConfirmMessageModal = (mContent, callback) => {
showConfirmModal('消息', mContent, callback)
}
// (
const showConfirmSuccessModall = (mContent, callback) => {
showConfirmModal('成功', mContent, callback)
}
// (
const showConfirmWarningModal = (mContent, callback) => {
showConfirmModal('警告', mContent, callback)
}
// (
const showConfirmQuestionModal = (mContent, callback) => {
showConfirmModal('疑问', mContent, callback)
}
// (
const showNoButtonModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showConfirmButton: false,
showCancelButton: false,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
} else {
callback(false)
}
}
}
})
}
// (
const showConfirmModal = (mIconType, mContent, callback) => {
console.log(11)
showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
success(res) {
console.log(11, res)
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
} else {
callback(false)
}
}
}
})
}
// (+
const showSelectMessageModal = (mContent, callback) => {
showSelectModal('消息', mContent, callback)
}
// (+
const showSelectSuccessModal = (mContent, callback) => {
showSelectModal('成功', mContent, callback)
}
// (+
const showSelectFailModal = (mContent, callback) => {
showSelectModal('失败', mContent, callback)
}
// (+
const showSelectWarningModal = (mContent, callback) => {
showSelectModal('警告', mContent, callback)
}
// (+
const showSelectModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
}
// (+)
const showConfirmCountdownQuestionModal = (mContent, callback) => {
showConfirmCountdownModal('疑问', mContent, callback)
}
// (+)
const showConfirmCountdownModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
showConfirmCountdown: true,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
} else {
callback(false)
}
}
}
})
}
// (++)
const showSelectCountdownMessageModal = (mContent, callback) => {
showSelectCountdownModal('消息', mContent, callback)
}
// (++)
const showSelectCountdownSuccessModal = (mContent, callback) => {
showSelectCountdownModal('成功', mContent, callback)
}
// (++)
const showSelectCountdownFailModal = (mContent, callback) => {
showSelectCountdownModal('失败', mContent, callback)
}
// (++)
const showSelectCountdownWarningModal = (mContent, callback) => {
showSelectCountdownModal('警告', mContent, callback)
}
// (++)
const showSelectCountdownQuestionModal = (mContent, callback) => {
showSelectCountdownModal('疑问', mContent, callback)
}
// (++)
const showSelectCountdownModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showConfirmCountdown: true,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
}
//
const showModal = (data) => {
if (data.iconType) {
iconType.value = data.iconType
switch (data.iconType) {
case '消息':
icon.value = '/static/icons/error-circle.svg'
break
case '成功':
icon.value = '/static/icons/checkmark-circle.svg'
break
case '失败':
icon.value = '/static/icons/close-circle.svg'
break
case '警告':
icon.value = '/static/icons/warning.svg'
break
case '疑问':
icon.value = '/static/icons/question-circle.svg'
break
default:
break
}
}
// image
if (data.title) {
title.value = data.title
}
if (data.content) {
content.value = data.content
} else {
content.value = ''
}
if (data.cancelText) {
cancelText.value = data.cancelText
} else {
cancelText.value = '取消'
}
if (data.confirmText) {
confirmText.value = data.confirmText
} else {
confirmText.value = '确定'
}
if (data.showCancel === false || data.showCancel === true) {
showCancel.value = data.showCancel
} else {
showCancel.value = true
}
if (data.confirmColor) {
confirmColor.value = data.confirmColor
} else {
confirmColor.value = '#007aff'
}
if (data.cancelColor) {
cancelColor.value = data.cancelColor
} else {
cancelColor.value = '#666F83'
}
if (data.showConfirmButton === false || data.showConfirmButton === true) {
showConfirmButton.value = data.showConfirmButton
} else {
showConfirmButton.value = true
}
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) {
showConfirmCountdown.value = data.showConfirmCountdown
} else {
showConfirmCountdown.value = false
}
if (data.showCancelButton === false || data.showCancelButton === true) {
showCancelButton.value = data.showCancelButton
} else {
showCancelButton.value = true
}
if (data.success) {
success.value = data.success
} else {
success.value = () => {}
}
setTimeout((res) => {
open()
}, 500)
if (showConfirmCountdown.value) {
startTimer()
}
}
const startTimer = () => {
seconds.value = 3
clearInterval(timer.value)
timer.value = setInterval(() => {
seconds.value--
// console.log("", this.seconds);
if (seconds.value <= 0) {
timeUp()
}
}, 1000)
}
const timeUp = () => {
// clearInterval(this.timer)
confirmClose()
}
defineExpose({
confirmClose,
cancelClose,
showSuccessMessage,
showErrorMessage,
showBreakMessage,
showQuestionMessage,
showWarningMessage,
showConfirmCountdownFailModal,
showConfirmMessageModal,
showConfirmSuccessModall,
showConfirmWarningModal,
showConfirmQuestionModal,
showNoButtonModal,
showConfirmModal,
showSelectMessageModal,
showSelectSuccessModal,
showSelectFailModal,
showSelectWarningModal,
showSelectModal,
showConfirmCountdownQuestionModal,
showConfirmCountdownModal,
showSelectCountdownMessageModal,
showSelectCountdownSuccessModal,
showSelectCountdownFailModal,
showSelectCountdownWarningModal,
showSelectCountdownQuestionModal,
showMessage,
showModal
})
</script>
<style lang="scss" scoped>
.slot-content {
font-size: 36rpx;
display: flex; //
flex-direction: column; //
align-items: center; //
// background-image: url()
}
.icon {
width: 70rpx;
height: 70rpx;
opacity: 1; //
margin-top: 16px;
}
.title {
font-size: 35rpx;
}
.content {
width: 100%;
margin-top: 16px;
margin-bottom: 16px;
margin-left: 8px;
margin-right: 8px;
font-size: 32rpx;
text-align: center;
}
.cance_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_text {
// color: $uni-color-primary;
}
.def_text {
color: $uni-color-primary;
}
.slot-content {
font-size: 36rpx;
display: flex; //
flex-direction: column; //
align-items: center; //
// background-image: url()
}
.icon {
width: 70rpx;
height: 70rpx;
opacity: 1; //
margin-top: 16px;
}
.title {
font-size: 35rpx;
}
.content {
width: 100%;
margin-top: 16px;
margin-bottom: 16px;
margin-left: 8px;
margin-right: 8px;
font-size: 32rpx;
text-align: center;
}
.cance_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_text {
// color: $uni-color-primary;
}
.def_text {
color: $uni-color-primary;
}
</style>

25
src/mycomponents/common/comPopup.vue

@ -10,26 +10,13 @@
</view>
</template>
<script>
export default {
emits: ["onClose"],
components: {
},
props: {
},
data() {
return {
}
},
methods: {
closeScanPopup() {
this.$emit("onClose", );
}
}
<script setup lang="ts">
const closeScanPopup = () => {
emit("onClose", );
}
//
const emit = defineEmits(['onClose'])
</script>
<style>

111
src/mycomponents/container/targetContainer.vue

@ -1,68 +1,57 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" @click="showLocation">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{containerCode}}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view>
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer>
</view>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
<text style="font-size: 35rpx">{{ title }} </text>
<view class="uni-flex u-col-center" @click="showLocation">
<text style="color: #3fbaff; font-size: 35rpx" v-if="containerCode == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="color: #3fbaff; font-size: 35rpx">&nbsp {{ containerCode }}</text>
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image>
</view>
<winScanContainer ref="scanContainer" :title="title" @getContainer="getContainer"></winScanContainer>
</view>
</template>
<script>
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue"
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue'
export default {
components: {
winScanContainer
},
data() {
return {
defaultContainerCode: ""
}
},
props: {
title: {
type: String,
default: "需求库位"
},
containerCode: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
},
},
const defaultContainerCode = ref('')
const props = defineProps({
title: {
type: String,
default: '需求库位'
},
containerCode: {
type: String,
default: ''
},
isShowEdit: {
type: Boolean,
default: true
}
})
watch(
() => props.containerCode,
(val) => {
if (val != '') {
defaultContainerCode.value = val
}
},
{
immediate: true,
deep: true
}
)
watch: {
containerCode: {
handler(newName, oldName) {
if (this.containerCode != "") {
this.defaultContainerCode = this.containerCode;
}
},
immediate: true,
deep: true
}
},
methods: {
showLocation() {
this.$refs.scanContainer.openScanPopup();
},
//
getContainer(containerInfo) {
this.$emit("getContainer", containerInfo)
}
}
}
const showLocation = () => {
scanContainer.value.openScanPopup()
}
//
const getContainer = (containerInfo) => {
emit('getContainer', containerInfo)
}
//
const emit = defineEmits(['getContainer'])
</script>
<style>
</style>
<style></style>

296
src/mycomponents/detail/comDetailCard.vue

@ -1,163 +1,145 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
</template>
<view class="" v-for="(item,index) in dataContent.subList" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"
style='padding:0px 0px 5px 0px;align-items: center;'>
<recommend :detail="item" :isShowToLocation="false">
</recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
</view>
<view class="" style="background-color: #fff">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty>
</template>
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<recommend :detail="item" :isShowToLocation="false"> </recommend>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
emits: ['openDetail', "updateData"],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
showItem: {},
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = null;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
}
}
const props = defineProps({
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
}
})
const option = ref([])
const showItem = ref({})
const editItem = ref({})
const locatonItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const comMessageRef = ref()
const collapse = ref()
const qtyEdit = ref()
const dataContent = ref(props.dataContent)
dataContent.value.subList.forEach((item) => {
item.show = false
})
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse.value != undefined && collapse.value != null) {
nextTick((res) => {
collapse.value.init()
})
}
}
},
{
immediate: true,
deep: true
}
)
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation)
}
nextTick((res) => {
collapse.value.init()
})
})
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
}
if (text == '详情') {
detail(item)
} else if (text == '编辑') {
edit(item)
} else if (text == '库位') {
showLocation(item)
} else if (text == '移除') {
remove(item)
}
}
const edit = (item) => {
editItem.value = item
qtyEdit.value.openEditPopup(item.balance, item.handleQty)
}
const detail = (item) => {
emit('openDetail', item)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = null
emit('remove', item)
}
})
}
const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
const showLocation = () => {
locatonItem.value = item
scanLocationCode.value.openScanPopup()
}
//
const getLocation = () => {
locatonItem.value.LocationCode = code
emit('updateData')
}
//
const emit = defineEmits(['openDetail', 'remove', 'updateData'])
</script>
<style>
</style>
<style></style>

276
src/mycomponents/detail/comJobDetailCard.vue

@ -1,161 +1,125 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="true"></itemCompareQty>
</template>
<package-list :dataContent="dataContent.subList"
:isEdit="settingParam.allowModifyQty=='TRUE'"
:settingParam="settingParam"
@collapseChange="collapseChange"
@updateData="updateData"
></package-list>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="message"></comMessage>
</view>
<view class="" style="background-color: #fff">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true" style="flex: 1"></itemCompareQty>
</template>
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty == 'TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData"></package-list>
</u-collapse-item>
</u-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
emits: ["updateData"],
components: {
itemCompareQty,
recommend,
recommendQtyEdit,
jobDetailPopup,
receiptDetailInfoPopup,
detailList,
packageList
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
locationAreaTypeList: {
type: Object,
default: null
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
locatonItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
updated() {
console.log('updated')
},
methods: {
collapseChange(){
setTimeout(() => {
this.resizeCollapse();
}, 500)
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.resize()
});
this.$forceUpdate();
},
refreshCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
this.$forceUpdate();
},
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
updateData(){
this.$emit('updateData')
}
}
}
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import packageList from '@/mycomponents/package/packageList.vue'
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
const props = defineProps({
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
locationAreaTypeList: {
type: Object,
default: null
}
})
const showItem = ref({})
const editItem = ref({
record: {}
})
const locatonItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const comMessageRef = ref()
const collapse = ref()
const receiptEdit = ref()
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse.value != undefined && collapse.value != null) {
nextTick((res) => {
collapse.value.init()
})
}
}
},
{
deep: true
}
)
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation)
}
})
const collapseChange = () => {
setTimeout(() => {
resizeCollapse()
}, 500)
}
const resizeCollapse = (object) => {
nextTick(() => {
collapse.value.init()
})
}
const refreshCollapse = () => {
nextTick((r) => {
collapse.value.forEach((r) => {
r.childrens.forEach((i) => {
i.init()
})
r.init()
})
})
}
const swipeClick = (e, item) => {
if (e.content.text == '编辑') {
edit(item)
} else if (e.content.text == '移除') {
remove(item)
}
}
const edit = (item) => {
editItem = item
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) {
item.scaned = false
item.handleQty = null
emit('remove', item)
}
})
}
const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
const updateData = () => {
emit('updateData')
}
//
const emit = defineEmits(['remove', 'updateData'])
</script>
<style>
</style>
<style></style>

269
src/mycomponents/detail/comRequestDetailCard.vue

@ -1,150 +1,135 @@
<template>
<view class="" style="background-color: #fff;">
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem">
</comReturnRequestInfo> -->
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty
:dataContent="dataContent"
:handleQty="Number(dataContent.handleQty)"
:isShowStdPack="false">
</item-compare-qty>
</template>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack"
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<comMessage ref="message"></comMessage>
</view>
<view class="" style="background-color: #fff">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" style="flex: 1"> </item-compare-qty>
</template>
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack" :isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, watch, nextTick } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
import { getDetailOption, getDetailEditRemoveOption, getDetailRemoveOption } from '@/common/array.js'
export default {
emits: ['openDetail'],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
comReturnRequestInfo
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
dataContent(newVal) {
var test =this.dataContent
this.requestItem = newVal.subList[0];
},
},
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: [],
requestItem:{}
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
}
}
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
}
})
const option = ref([])
const showItem = ref({})
const editItem = ref({
record: {}
})
const detailOptions = ref([])
const scanOptions = ref([])
const requestItem = ref({})
const qtyEdit = ref()
const comMessageRef = ref()
const dataContent = ref([])
const collapse = ref()
dataContent.value = props.dataContent
dataContent.value.subList.forEach((item) => {
item.show = false
})
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
if (scanOptions.value.length == 0) {
scanOptions.value = getDetailEditRemoveOption()
}
})
//
watch(
() => props.dataContent,
(val) => {
requestItem.value = val.subList[0]
dataContent.value = val
dataContent.value.subList.forEach((item) => {
item.show = false
})
nextTick(() => {
collapse.value.init()
})
},
{
immediate: true,
deep: true
}
)
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
}
if (text == '详情') {
detail(item)
} else if (text == '编辑') {
edit(item)
} else if (text == '移除') {
remove(item)
}
}
const edit = (item) => {
editItem.value = item
qtyEdit.value.openEditPopup(item.balance, item.record.qty)
}
const detail = (item) => {
emit('openDetail', item)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
emit('remove', item)
}
})
}
const confirm = (qty) => {
editItem.value.record.qty = qty
emit('updateData')
}
//
const emit = defineEmits(['openDetail', 'remove', 'updateData'])
</script>
<style>
::v-deep .u-arrow-down-icon {
margin-right: 0px !important;
}
</style>

40
src/mycomponents/detail/detailBalanceInfo.vue

@ -15,12 +15,12 @@
<text class="item_title">数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUomInfo(dataContent.uom)}}</text>
<text class="text_wrap">{{handleGetUomInfo(dataContent.uom)}}</text>
</view>
</view>
<view class="item">
<text class="item_title">库存状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
<text class="text_wrap">{{handleGetInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">来源库位 : </text>
@ -29,37 +29,25 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUomInfo(value){
return getUomInfo(value).label
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const handleGetInventoryStatusInfo=(value)=> {
return getInventoryStatusName(value)
}
const handleGetUomInfo=(value)=>{
return getUomInfo(value).label
}
</script>
<style>

103
src/mycomponents/detail/detailCommonInfo.vue

@ -1,65 +1,48 @@
<template>
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
<detail-item-info :dataContent="dataContent"></detail-item-info>
<view class='split_line'></view>
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info>
<view class='split_line'></view>
<view v-if="dataContent.record!=undefined">
<detail-handle-info :dataContent="dataContent">
</detail-handle-info>
<view class='split_line'></view>
</view>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
<view class="pop_detail" style="height: 80%">
<view class="u-p-t-20 u-p-b-20">
<com-item :dataContent="dataContent"></com-item>
</view>
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<detail-item-info :dataContent="dataContent"></detail-item-info>
<view class="split_line"></view>
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info>
<view class="split_line"></view>
<view v-if="dataContent.record != undefined">
<detail-handle-info :dataContent="dataContent"> </detail-handle-info>
<view class="split_line"></view>
</view>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailRecommendInfo,
detailHandleInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
<script setup lang="ts">
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue'
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const closePopup = () => {
emit('onClose')
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

29
src/mycomponents/detail/detailHandleInfo.vue

@ -29,32 +29,19 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const getInventoryStatusInfo=(value)=> {
return getInventoryStatusName(value).label
}
</script>

33
src/mycomponents/detail/detailItemInfo.vue

@ -10,34 +10,21 @@
</view>
<view class="item">
<text class="item_title">数量 : </text>
<text class="text_wrap">{{dataContent.qty}}{{getUomInfo(dataContent.uom)}} </text>
<text class="text_wrap">{{dataContent.qty}}{{handleGetUomInfo(dataContent.uom)}} </text>
</view>
</view>
</template>
<script>
import{getUomInfo} from "@/common/directory.js"
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getUomInfo(value){
return getUomInfo(value).label
}
<script setup lang="ts">
import { getUomInfo } from "@/common/directory.js"
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const handleGetUomInfo = (value) => {
return getUomInfo(value).label
}
</script>

32
src/mycomponents/detail/detailPackageInfo.vue

@ -27,37 +27,19 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUomInfo(value){
return getUomInfo(value).label
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
}
})
</script>
<style>

39
src/mycomponents/detail/detailRecommendInfo.vue

@ -15,12 +15,12 @@
<text class="item_title">明细数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUomInfo(dataContent.uom)}}</text>
<text class="text_wrap">{{handleGegetUomInfo(dataContent.uom)}}</text>
</view>
</view>
<view class="item">
<text class="item_title">明细状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
<text class="text_wrap">{{handleGetInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">来源库位 : </text>
@ -33,36 +33,23 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUomInfo(value){
return getUomInfo(value).label
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const handleGetInventoryStatusInfo = (value) => {
return getInventoryStatusName(value)
}
const handleGegetUomInfo = (value) => {
return getUomInfo(value).label
}
</script>

121
src/mycomponents/detail/jobDetailPopup.vue

@ -1,79 +1,66 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent='dataContent'></detail-common-info>
</uni-popup>
</view>
<view class="">
<u-popup v-model="show" mode="bottom">
<detail-common-info :dataContent="dataContent"></detail-common-info>
</u-popup>
</view>
</template>
<script>
import {
getInventoryStatusName,
getPackUnitInfo
} from '@/common/directory.js';
<script setup lang="ts">
import { ref } from 'vue'
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js'
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {}
}
},
props: {
title: {
type: String,
default: ""
},
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
},
methods: {
openScanPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close()
},
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
}
}
const props = defineProps({
title: {
type: String,
default: ''
}
})
const show = ref(false)
const dataContent = ref('')
const openScanPopup = (val) => {
dataContent.value = val
setTimeout((res) => {
show.value = true
}, 500)
}
const closeScanPopup = () => {
show.value = false
}
const getInventoryStatusInfo = (value) => {
return getInventoryStatusName(value).label
}
const getPackUnit = (uom) => {
const item = getPackUnitInfo(uom)
if (item == '') {
return uom
}
return item.label
}
</script>
<style>
.popup_box {
width: 500rpx;
height: 500rpx;
}
.popup_box {
width: 500rpx;
height: 500rpx;
}
.item_big_title {
color: #2196F3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.item_big_title {
color: #2196f3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
.item_title {
color: #000000;
font-size: 32rpx;
}
.item_title {
color: #000000;
font-size: 32rpx;
}
</style>

92
src/mycomponents/detail/recordDetailCommonInfo.vue

@ -1,60 +1,42 @@
<template>
<view class="pop_detail" style="height:80%">
<view class='split_line'></view>
<scroll-view style="height:320px ">
<scroll-view style="height:320px ">
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<view class='split_line'></view>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<!-- 包装 -->
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> -->
</scroll-view>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
<view class="pop_detail" style="height: 80%">
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<view class="split_line"></view>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<!-- 包装 -->
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> -->
</scroll-view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
detailItemInfo,
detailPackageInfo,
detailBalanceInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
<script setup lang="ts">
import { ref } from 'vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const closePopup = () => {
emit('onClose')
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

113
src/mycomponents/detail/recordDetailPopup.vue

@ -1,71 +1,52 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<view class='split_line'></view>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<view class='split_line'></view>
<!-- 包装 -->
<detail-package-info :dataContent="dataContent.package"></detail-package-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
<u-popup v-model="show" mode="bottom">
<view class="pop_detail" style="height: 80%">
<com-item :dataContent="dataContent"></com-item>
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<view class="split_line"></view>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<view class="split_line"></view>
<!-- 包装 -->
<detail-package-info :dataContent="dataContent.package"></detail-package-info>
</scroll-view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</u-popup>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailPackageInfo,
detailBalanceInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closePopup() {
this.$refs.popup.close()
},
}
}
<script setup lang="ts">
import { ref } from 'vue'
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const show = ref(false)
const dataContent = ref(props.dataContent)
const openPopup = (val) => {
dataContent.value = val
setTimeout((res) => {
show.value = true
}, 500)
}
const closePopup = () => {
show.value = false
}
defineExpose({ openPopup, closePopup })
</script>
<style>
</style>
<style></style>

102
src/mycomponents/detail/requestDetailCommonInfo.vue

@ -1,65 +1,47 @@
<template>
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<view class='split_line'></view>
<!-- 包装 -->
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
<view class="pop_detail" style="height: 80%">
<view class="u-p-t-20 u-p-b-20">
<com-item :dataContent="dataContent"></com-item>
</view>
<view class="split_line u-m-b-10"></view>
<scroll-view style="height: 320px" scroll-y>
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<view class="split_line u-m-t-10 u-m-b-10"></view>
<!-- 包装 -->
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="u-flex u-row-center u-m-t-20 u-p-b-20">
<view class="close_button" @click="closePopup">关闭</view>
</view>
</view>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
requestDetailBasicInfo,
detailRecommendInfo,
detailItemInfo,
detailBalanceInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
<script setup lang="ts">
import comItem from '@/mycomponents/item/item.vue'
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const closePopup = () => {
emit('onClose')
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

62
src/mycomponents/item/item.vue

@ -1,46 +1,26 @@
<template>
<view>
<view class="uni-flex u-col-center space-between">
<view >
<view class="card_itemCode" :class="openPopup(dataContent)">
{{dataContent.itemCode}}
</view>
<view class="card_itemName">
{{dataContent.itemName}}
</view>
</view>
</view>
</view>
<view>
<view class="uni-flex u-col-center space-between u-p-t-20">
<view>
<view class="card_itemCode" :class="openPopup(dataContent)">
{{ dataContent.itemCode }}
</view>
<view class="card_itemName u-m-t-10">
{{ dataContent.itemName }}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
};
},
//
props: {
dataContent: {
type: Object,
default: {}
}
},
watch: {
},
methods: {
openPopup(val) {
// console.log(JSON.stringify(val));
},
},
}
<script setup lang="ts">
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const openPopup = (val) => {}
</script>
<style>
</style>
<style></style>

100
src/mycomponents/item/itemCompareQty.vue

@ -1,67 +1,43 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;">
<view>
<item :dataContent="dataContent"></item>
</view>
<view style="word-break: break-all;width: 30%;display: flex;justify-content:flex-end;margin-right: 10rpx;">
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true"
:objTextStyle='objTextStyle'></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit">
</compare-qty>
</view>
</view>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color: #fff">
<view style="flex: 1">
<item :dataContent="dataContent"></item>
</view>
<view style="word-break: break-all; display: flex; justify-content: flex-end; margin-right: 10rpx">
<recommend-qty v-if="handleQty == 0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true" :objTextStyle="objTextStyle"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> </compare-qty>
</view>
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
<script setup lang="ts">
import { ref, getCurrentInstance, watch } from 'vue'
import item from '@/mycomponents/item/item.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
item,
recommendQty,
compareQty,
balanceQty
},
data() {
return {
};
},
//
props: {
type: {
type: String,
default: 'recommend' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowPackUnit: {
type: Boolean,
default: true
},
objTextStyle: {
type: Object,
default: null
}
},
watch: {
},
methods: {
},
}
const { proxy } = getCurrentInstance()
const props = defineProps({
type: {
type: String,
default: 'recommend' // recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowPackUnit: {
type: Boolean,
default: true
},
objTextStyle: {
type: Object,
default: null
}
})
</script>
<style>
</style>
<style></style>

85
src/mycomponents/item/itemInfo.vue

@ -1,58 +1,43 @@
<!--包装组件-->
<template>
<view class="">
<view class="uni-flex space-between padding_10" style="background-color: #fff;" >
<view>
<view class="font_xl text_black text_bold " style="font-size: 38rpx;">
{{ itemdetail.code }}
</view>
<view class="" style="font-size: 32rpx;">
{{ itemdetail.name }}
</view>
<view class="" style="font-size: 32rpx;">
{{ itemdetail.desc1 }}
{{ itemdetail.desc2 }}
</view>
</view>
<view class="">
<item-status :status="itemdetail.status"></item-status>
</view>
</view>
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup>
</view>
<view class="">
<view class="uni-flex space-between padding_10" style="background-color: #fff; padding: 20rpx">
<view>
<view class="font_xl text_black text_bold" style="font-size: 38rpx">
{{ itemdetail.code }}
</view>
<view class="" style="font-size: 32rpx">
{{ itemdetail.name }}
</view>
<view class="" style="font-size: 32rpx">
{{ itemdetail.desc1 }}
{{ itemdetail.desc2 }}
</view>
</view>
<view class="">
<item-status :status="itemdetail.status"></item-status>
</view>
</view>
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup>
</view>
</template>
<script>
import itemStatus from '@/mycomponents/item/itemStatus.vue';
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue';
export default {
name: "comItem",
components: {
itemInfoPopup,
itemStatus
},
data() {
return {
<script setup lang="ts">
import { ref } from 'vue'
import itemStatus from '@/mycomponents/item/itemStatus.vue'
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue'
};
},
//
props: {
itemdetail: {
type: Object,
value: null
}
},
methods: {
showHint() {
this.$refs.showHint.openScanPopup()
}
}
}
const props = defineProps({
itemdetail: {
type: Object,
value: null
}
})
const showHint = ref()
const handleShowHint = () => {
showHint.value.openScanPopup()
}
</script>
<style>
</style>
<style></style>

270
src/mycomponents/item/itemInfoPopup.vue

@ -1,32 +1,28 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_detail">
<view class="uni-flex space-between u-col-center"
style="padding-bottom: 15rpx;">
<view class="text_ellipsis" v-if="number" style="font-size: 35rpx;flex: 3;">
编号:{{number}}
</view>
<view class="text_ellipsis" v-else style="font-size: 40rpx;">
<view class="">
{{itemCode}}
</view>
<view class="">
{{itemDesc}}
</view>
</view>
<view class="uni-center" style="flex: 1;">
<view v-if="jobStatus==2" class="task_state_doing">
<text>执行中</text>
</view>
<view v-if="jobStatus==1" class="task_state_un-doing">
<text>待执行</text>
</view>
</view>
<!-- <view class="" v-else="number">
<view class="">
<u-popup v-model="show" mode="center">
<view class="uni-flex uni-column pop_detail">
<view class="uni-flex space-between u-col-center" style="padding-bottom: 15rpx">
<view class="text_ellipsis" v-if="number" style="font-size: 35rpx; flex: 3"> 编号:{{ number }} </view>
<view class="text_ellipsis" v-else style="font-size: 40rpx">
<view class="">
{{ itemCode }}
</view>
<view class="">
{{ itemDesc }}
</view>
</view>
<view class="uni-center" style="flex: 1">
<view v-if="jobStatus == 2" class="task_state_doing">
<text>执行中</text>
</view>
<view v-if="jobStatus == 1" class="task_state_un-doing">
<text>待执行</text>
</view>
</view>
<!-- <view class="" v-else="number">
<view class="text_ellipsis" style="font-size: 40rpx;flex: 1;">
<view class="">
{{itemCode}}
@ -37,123 +33,109 @@
</view>
</view> -->
</view>
<view class='split_line'></view>
<view class="" v-for="(item, index) in dataList">
<view class="item" v-if="(item.title!='worker')" v-show="(item.title!='date')">
<text class="item_title">{{item.title}} : </text>
<text class="text_wrap">{{item.content}} </text>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowbottom" style="margin-top: 10rpx;margin-bottom: 10rpx;width: 100%;display: flex;"
class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center " style="flex: 1; overflow: hidden;">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text class="text_ellipsis">{{getContent("worker")}}</text>
</view>
<view class="uni-flex uni-row u-col-center " style="flex: 3;justify-content: flex-end;overflow: hidden;">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{formatDate(getContent("date"))}}</text>
</view>
</view>
</view>
<view class="uni-flex u-row-center ">
<image src="/static/icons/icons_close-circle.svg"
mode=""
class="icons_close"
@click="closeScanPopup()"
></image>
</view>
</uni-popup>
</view>
</view>
<view class="split_line"></view>
<view class="" v-for="(item, index) in dataList">
<view class="item" v-if="item.title != 'worker'" v-show="item.title != 'date'">
<text class="item_title">{{ item.title }} : </text>
<text class="text_wrap">{{ item.content }} </text>
</view>
</view>
<view class="split_line"></view>
<view v-if="isShowbottom" style="margin-top: 10rpx; margin-bottom: 10rpx; width: 100%; display: flex" class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center" style="flex: 1; overflow: hidden">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text class="text_ellipsis">{{ getContent('worker') }}</text>
</view>
<view class="uni-flex uni-row u-col-center" style="flex: 3; justify-content: flex-end; overflow: hidden">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{ formatDate(getContent('date')) }}</text>
</view>
</view>
</view>
<view class="uni-flex u-row-center">
<image src="/static/icons/icons_close-circle.svg" mode="" class="icons_close" @click="closeScanPopup()"> </image>
</view>
</u-popup>
</view>
</template>
<script>
import {
dateFormat,
} from '@/common/basic.js';
export default {
mounted() {
},
props: {
title: {
type: String,
default: ""
},
dataContent: {
type: Object,
default: {}
},
number:{
type: String,
default: ""
},
jobStatus:{
type: Number,
default: -1
},
dataList:{
type: Object,
default: []
},
worker:{
type: String,
default: ""
},
date:{
type: String,
default: ""
},
itemCode:{
type: String,
default: ""
},
itemDesc:{
type: String,
default: ""
},
isShowbottom:{
type: Boolean,
default: true
}
},
methods: {
openScanPopup() {
this.$refs.popup.open('center')
},
closeScanPopup() {
this.$refs.popup.close()
},
startEdit() {
this.$refs.receiptCountEdit.openScanPopup();
},
formatDate(val) {
return dateFormat(val)
},
getContent(title){
let items = this.dataList.filter(r => {
if (r.title==title) {
return r;
}
})
if(items!=null&&items.length>0){
return items[0].content;
}
}
}
}
<script setup lang="ts">
import { ref } from 'vue'
import { dateFormat } from '@/common/basic.js'
const props = defineProps({
title: {
type: String,
default: ''
},
dataContent: {
type: Object,
default: {}
},
number: {
type: String,
default: ''
},
jobStatus: {
type: Number,
default: -1
},
dataList: {
type: Object,
default: []
},
worker: {
type: String,
default: ''
},
date: {
type: String,
default: ''
},
itemCode: {
type: String,
default: ''
},
itemDesc: {
type: String,
default: ''
},
isShowbottom: {
type: Boolean,
default: true
}
})
const receiptCountEdit = ref()
const show = ref(false)
const openScanPopup = () => {
show.value = true
}
const closeScanPopup = () => {
show.value = false
}
const startEdit = () => {
receiptCountEdit.value.openScanPopup()
}
const formatDate = (val) => {
return dateFormat(val)
}
const getContent = (title) => {
const items = props.dataList.filter((r) => {
if (r.title == title) {
return r
}
})
if (items != null && items.length > 0) {
return items[0].content
}
}
defineExpose({
openScanPopup,
closeScanPopup
})
</script>
<style>
</style>
<style></style>

86
src/mycomponents/item/itemQty.vue

@ -1,59 +1,37 @@
<template>
<view class="uni-flex uni-row space-between center" style="background-color:#fff; margin-left: 15px;">
<view>
<item :dataContent="dataContent"></item>
</view>
<view>
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack">
</compare-qty>
</view>
</view>
<view class="uni-flex uni-row space-between center" style="width: 100%">
<view style="flex: 1">
<item :dataContent="dataContent"></item>
</view>
<view>
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> </compare-qty>
</view>
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
<script setup lang="ts">
import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
item,
balanceQty,
compareQty
},
data() {
return {
};
},
//
props: {
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowBalanceQty: {
type: Boolean,
default: true
},
showStdPack: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
},
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowBalanceQty: {
type: Boolean,
default: true
},
showStdPack: {
type: Boolean,
default: false
}
})
</script>
<style>
</style>
<style></style>

34
src/mycomponents/job/jobBottom.vue

@ -1,6 +1,6 @@
<template>
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" -->
<view class="task_item">
<view class="u-p-t-20 u-p-b-20">
<view class="uni-flex space-between u-col-center">
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
@ -14,34 +14,18 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
dateFormat
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
formatDate: function(val) {
return dateFormat(val)
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const formatDate = (val) => {
return dateFormat(val)
}
</script>

27
src/mycomponents/job/jobComMainCard.vue

@ -10,30 +10,15 @@
</view>
</template>
<script>
<script setup lang="ts">
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
export default {
components: {
jobTop,
jobBottom,
},
data() {
return {};
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
}
})
</script>
<style lang="scss">

53
src/mycomponents/job/jobComMainCardAsn.vue

@ -1,41 +1,24 @@
<template>
<view>
<view class="task_card">
<jobTopAsn :dataContent="dataContent"></jobTopAsn>
<slot></slot>
<view class='split_line'></view>
<job-bottom :dataContent="dataContent"></job-bottom>
</view>
</view>
<view>
<view class="task_card">
<jobTopAsn :dataContent="dataContent"></jobTopAsn>
<slot></slot>
<view class="split_line"></view>
<job-bottom :dataContent="dataContent"></job-bottom>
</view>
</view>
</template>
<script>
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
<script setup lang="ts">
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
export default {
components: {
jobTopAsn,
jobBottom,
},
data() {
return {
};
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

130
src/mycomponents/job/jobComMainDetailCard.vue

@ -1,79 +1,61 @@
<template>
<view class="task_item">
<view class="task_text" style="border-top: 1px solid #dedede;padding-top: 20rpx;margin-top: 20rpx;">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false"
:objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}"></itemCompareQty>
<div class="u-p-l-10">
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between">
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
</div>
</div>
</view>
</view>
<view class="">
<view class="task_text" style="border-top: 1px solid #dedede; padding-top: 20rpx">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" :objTextStyle="{ fontWeight: 'bold', fontSize: '40rpx' }"></itemCompareQty>
<div>
<pack v-if="isShowPack && dataContent.packingNumber != null" :packingCode="dataContent.packingNumber"> </pack>
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between u-p-b-16">
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> </to-location>
</div>
<view class="card_view" v-if="isShowDeliverType">
<text class="card_packing_code card_content">发货类型</text>
<text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text>
</view>
</div>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
export default {
components: {
pack,
location,
toLocation,
batch,
jobComMainCard,
itemCompareQty,
},
data() {
return {};
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: true
},
},
methods: {
}
}
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: true
},
isShowDeliverType: {
type: Boolean,
default: false
}
})
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

90
src/mycomponents/job/jobCommonInfo.vue

@ -1,62 +1,44 @@
<template>
<view class="pop_detail" style="height:80%">
<job-top :dataContent="dataContent"></job-top>
<view class='split_line'></view>
<scroll-view style="height:400px ">
<slot>
<!-- 每个任务的详情 -->
</slot>
<job-request-info :dataContent="dataContent"></job-request-info>
<view class='split_line'></view>
<job-person-info :dataContent="dataContent"></job-person-info>
<view class='split_line'></view>
<job-setting-info :dataContent="dataContent"></job-setting-info>
</scroll-view>
<view class="pop_detail" style="height: 80%">
<job-top :dataContent="dataContent"></job-top>
<view class="split_line"></view>
<scroll-view style="height: 400px" scroll-y>
<slot>
<!-- 每个任务的详情 -->
</slot>
<job-request-info :dataContent="dataContent"></job-request-info>
<view class="split_line"></view>
<job-person-info :dataContent="dataContent"></job-person-info>
<view class="split_line"></view>
<job-setting-info :dataContent="dataContent"></job-setting-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue'
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue'
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue'
export default {
emits: ['onClose'],
components: {
jobTop,
jobBottom,
jobPersonInfo,
jobSettingInfo,
jobRequestInfo
},
data() {
return {}
},
<script setup lang="ts">
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue'
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue'
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue'
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const closePopup = () => {
emit('onClose')
}
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

125
src/mycomponents/job/jobDetailPopup.vue

@ -1,79 +1,70 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent='dataContent' @onClose="closeScanPopup()" ></detail-common-info>
</uni-popup>
</view>
<view class="">
<u-popup mode="bottom" v-model="show">
<detail-common-info :dataContent="dataContent" @onClose="closeScanPopup()"></detail-common-info>
</u-popup>
</view>
</template>
<script>
import {
getInventoryStatusName,
getPackUnitInfo
} from '@/common/directory.js';
<script setup lang="ts">
import { ref } from 'vue'
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js'
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {}
}
},
props: {
title: {
type: String,
default: ""
},
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
},
methods: {
openScanPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close()
},
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.name
}
}
}
}
const dataContent = ref({})
const show = ref(false)
const props = defineProps({
title: {
type: String,
default: ''
}
})
const openScanPopup = (val) => {
dataContent.value = val
setTimeout((res) => {
show.value = true
}, 500)
}
const closeScanPopup = () => {
show.value = false
}
const getInventoryStatusInfo = (value) => {
return getInventoryStatusName(value).label
}
const getPackUnit = (uom) => {
const item = getPackUnitInfo(uom)
if (item == '') {
return uom
}
return item.name
}
defineExpose({
openScanPopup,
closeScanPopup
})
</script>
<style>
.popup_box {
width: 500rpx;
height: 500rpx;
}
.popup_box {
width: 500rpx;
height: 500rpx;
}
.item_big_title {
color: #2196F3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.item_big_title {
color: #2196f3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
.item_title {
color: #000000;
font-size: 32rpx;
}
.item_title {
color: #000000;
font-size: 32rpx;
}
</style>

299
src/mycomponents/job/jobFilter.vue

@ -1,155 +1,166 @@
<template>
<uni-popup ref="popup">
<view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center"
style="background-color: white;width: 200px; height:auto;padding: 20rpx;z-index: 99;position: relative;">
<view class="uni-flex space-between u-col-center" style="width: 100%;">
<view class="" style="font-size: 32rpx;">
只看当天
</view>
<u-popup v-model="show" @click="show = false" mode="right" width="450rpx">
<view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center" style="background-color: white; width: 200px; height: auto; padding: 20rpx; z-index: 100; position: relative; top: 100rpx; right: 20rpx; left: 30rpx; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); border-radius: 10rpx">
<view class="uni-flex space-between u-col-center" style="width: 100%">
<view class="" style="font-size: 32rpx"> 只看当天 </view>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch>
</view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
只看待处理
</view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch>
</view>
<view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after"
@click="scanOtherClick">扫描ASN单号</button>
</view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx;">
<button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button>
</view>
</view>
</view>
</uni-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number>
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch>
</view>
<view class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 只看待处理 </view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch>
</view>
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 生产线 </view>
<u-input style="margin-left: 20rpx" v-model="productionLineCode" :border="true" placeholder="请输入生产线" @confirm="productionLineCodeConfirm" />
</view>
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 来源库位 </view>
<u-input style="margin-left: 20rpx" v-model="fromLocationCode" :border="true" placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</view>
<view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after" @click="scanOtherClick">扫描ASN单号</button>
</view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowJob">
<button class="filter_button" hover-class="filter_button_after" @click="scanNumberClick">扫描任务编号</button>
</view>
</view>
</view>
</u-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode="getScanNumber"></win-scan-job-number>
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode="getScanAsNumber"></win-scan-asn-number>
</template>
<script>
import {
getTodayDate
} from '@/common/basic.js';
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue"
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default {
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"],
components: {
winScanJobNumber,
winScanAsnNumber
},
<script setup lang="ts">
import { ref, getCurrentInstance, watch } from 'vue'
import { getTodayDate } from '@/common/basic.js'
props: {
checkedToday: {
type: Boolean,
default: false
},
checkedWaitTask: {
type: Boolean,
default: false
},
otherTitle: {
type: String,
default: ""
},
isShowAsn:{
type: Boolean,
default: false
}
},
data() {
return {
dataContent: {},
checkedTodayModel:false,
checkedWaitModel:false,
}
},
watch: {
checkedToday: {
handler(newName, oldName) {
this.checkedTodayModel = this.checkedToday
},
immediate: true,
deep: true
},
checkedWaitTask: {
handler(newName, oldName) {
this.checkedWaitModel = this.checkedWaitTask
},
immediate: true,
deep: true
}
},
mounted() {
},
methods: {
//
maskClick() {
//
this.closeScanPopup();
},
openFilter() {
this.$refs['popup'].open("right");
},
closeScanPopup() {
this.$refs.popup.close()
},
switchChangeToday(isOn) {
import winScanJobNumber from '@/mycomponents/scan/winScanJobNumber.vue'
import winScanAsnNumber from '@/mycomponents/scan/winScanAsnNumber.vue'
let creationTime = '';
if (isOn) {
creationTime = getTodayDate();
}
const props = defineProps({
checkedToday: {
type: Boolean,
default: false
},
checkedWaitTask: {
type: Boolean,
default: false
},
otherTitle: {
type: String,
default: ''
},
isShowAsn: {
type: Boolean,
default: false
},
isShowJob: {
type: Boolean,
default: true
},
isShowFromLocationCode: {
type: Boolean,
default: false
},
isShowProductionLineCode: {
type: Boolean,
default: false
}
})
const dataContent = ref({})
const checkedTodayModel = ref(false)
const checkedWaitModel = ref(false)
const productionLineCode = ref('') // 线
const fromLocationCode = ref('') //
const show = ref(false)
const scanNumber = ref()
const scanAsnNumber = ref()
//
watch(
() => props.checkedToday,
(newVal) => {
checkedTodayModel.value = newVal
console.log(checkedTodayModel.value)
},
{ immediate: true, deep: true }
)
watch(
() => props.checkedWaitTask,
(newVal) => {
checkedWaitModel.value = newVal
},
{ immediate: true, deep: true }
)
// 线
this.$emit("switchChangeToday", isOn, creationTime)
this.closeScanPopup()
},
switchChangeWait(isOn) {
let status = "1,2";
if(isOn){
status="1"
}
this.$emit("switchChangeWait", isOn, status)
this.closeScanPopup()
},
const productionLineCodeConfirm = () => {
emit('productionLineCode', productionLineCode.value)
}
//
scanNumberClick() {
this.$refs.scanNumber.openScanPopup();
},
scanOtherClick() {
this.$refs.scanAsnNumber.openScanPopup();
},
getScanAsNumber(val) {
this.$emit("onScanAsnNumber", val)
this.$refs.scanAsnNumber.closeScanPopup();
this.closeScanPopup();
},
getScanNumber(val) {
this.$emit("onScanNumber", val)
this.$refs.scanNumber.closeScanPopup();
this.closeScanPopup();
},
}
}
const fromLocationCodeConfirm = () => {
emit('fromLocationCode', fromLocationCode.value)
}
//
const maskClick = () => {
//
closeScanPopup()
}
const openFilter = () => {
show.value = true
}
const closeScanPopup = () => {
show.value = false
}
const switchChangeToday = (isOn) => {
let creationTime = ''
if (isOn) {
creationTime = getTodayDate()
}
emit('switchChangeToday', isOn, creationTime)
closeScanPopup()
}
const switchChangeWait = (isOn) => {
let status = '1,2'
if (isOn) {
status = '1'
}
emit('switchChangeWait', isOn, status)
closeScanPopup()
}
const scanNumberClick = () => {
scanNumber.value.openScanPopup()
}
const scanOtherClick = () => {
scanAsnNumber.value.openScanPopup()
}
const getScanAsNumber = (val) => {
emit('onScanAsnNumber', val)
scanAsnNumber.value.closeScanPopup()
closeScanPopup()
}
const getScanNumber = (val) => {
emit('onScanNumber', val)
scanNumber.value.closeScanPopup()
closeScanPopup()
}
const emit = defineEmits(['switchChangeToday', 'switchChangeWait', 'onScanNumber', 'onScanAsnNumber', 'productionLineCode', 'fromLocationCode'])
defineExpose({ openFilter })
</script>
<style lang="scss">
.maskbox {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
.maskbox {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
::v-deep .u-drawer-right {
background-color: rgba(0, 0, 0, 0) !important;
}
</style>

28
src/mycomponents/job/jobNumber.vue

@ -5,27 +5,13 @@
</view>
</template>
<script>
export default {
components: {},
data() {
return {
};
},
watch: {
},
props: {
number: {
type: String,
default: ''
},
},
methods: {}
}
<script setup lang="ts">
const props = defineProps({
number: {
type: String,
default: ''
}
})
</script>
<style lang="scss">

37
src/mycomponents/job/jobPersonInfo.vue

@ -8,7 +8,7 @@
</view>
<view class="item">
<text class="item_title">承接时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.acceptTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.acceptTime)}} </text>
</view>
<view class="item">
<text class="item_title">创建人 : </text>
@ -16,7 +16,7 @@
</view>
<view class="item">
<text class="item_title">创建时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.createTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.createTime)}} </text>
</view>
<view class="item">
<text class="item_title">完成人 : </text>
@ -24,39 +24,26 @@
</view>
<view class="item">
<text class="item_title">完成时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.completeTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.completeTime)}} </text>
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {dateFormat} from "@/common/basic.js"
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
dateFormat(value){
return dateFormat(value)
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const handleDateFormat = (value) => {
return dateFormat(value)
}
</script>
<style>

76
src/mycomponents/job/jobRequestInfo.vue

@ -8,11 +8,11 @@
</view>
<view class="item">
<text class="item_title">申请时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.requestTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.requestTime)}} </text>
</view>
<view class="item">
<text class="item_title">要求截至时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.requestDueTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.requestDueTime)}} </text>
</view>
<view class="item">
<text class="item_title">从仓库代码 : </text>
@ -24,26 +24,37 @@
</view>
<view class="item">
<text class="item_title">出库库存状态范围 : </text>
<text class="text_wrap">{{getInventoryStatusDesc(getDirectoryItemArray(dataContent.outInventoryStatuses))}} </text>
<text
class="text_wrap">{{handleGetInventoryStatusDesc(handleGetDirectoryItemArray(dataContent.outInventoryStatuses))}}
</text>
</view>
<view class="item">
<text class="item_title">入库库存状态范围 : </text>
<text class="text_wrap">{{getInventoryStatusDesc(getDirectoryItemArray(dataContent.inInventoryStatuses))}} </text>
<text
class="text_wrap">{{handleGetInventoryStatusDesc(handleGetDirectoryItemArray(dataContent.inInventoryStatuses))}}
</text>
</view>
<view class="item">
<text class="item_title">从库位类型范围 : </text>
<text class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(dataContent.fromLocationTypes))}} </text>
<text
class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(dataContent.fromLocationTypes))}}
</text>
</view>
<view class="item">
<text class="item_title">到库位类型范围 : </text>
<text class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(dataContent.toLocationTypes))}} </text>
<text
class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(dataContent.toLocationTypes))}}
</text>
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
} from 'vue'
import {
dateFormat,
getDirectoryItemArray,
@ -53,41 +64,24 @@
getInventoryStatusDesc,
getLocationTypeNameList
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
list:["OK"]
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
dateFormat(value){
return dateFormat(value)
},
getInventoryStatusDesc(value){
return getInventoryStatusDesc(value)
},
getDirectoryItemArray(value){
return getDirectoryItemArray(value)
},
getLocationTypeNameList(value){
return getLocationTypeNameList(value)
}
const list = ref(["OK"])
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const handleDateFormat = (value) => {
return dateFormat(value)
}
const handleGetInventoryStatusDesc = (value) => {
return getInventoryStatusDesc(value)
}
const handleGetDirectoryItemArray = (value) => {
return getDirectoryItemArray(value)
}
const handleGetLocationTypeNameList = (value) => {
return getLocationTypeNameList(value)
}
</script>

33
src/mycomponents/job/jobSettingInfo.vue

@ -44,31 +44,16 @@
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
converter(val) {
// return ''
return val == "TRUE" ? '是' : '否'
}
<script setup lang="ts">
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const converter = (val) => {
// return ''
return val == "TRUE" ? '是' : '否'
}
</script>

42
src/mycomponents/job/jobStatus.vue

@ -1,42 +1,28 @@
<template>
<view >
<view>
<text :class="statusStyle(jobStatus)">
{{ jobStatusInfo.label}}
</text>
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
} from 'vue'
import {
getJobStateInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
jobStatusInfo: {}
};
},
watch: {},
props: {
jobStatus: {
type: String,
default: ""
}
},
mounted() {},
methods: {
statusStyle(value) {
this.jobStatusInfo = getJobStateInfo(value);
return getJobStateInfo(value).remark
},
const props = defineProps({
jobStatus: {
type: String,
default: ""
}
})
const jobStatusInfo = ref({})
const statusStyle = (value) => {
jobStatusInfo.value = getJobStateInfo(value);
return getJobStateInfo(value).remark
}
</script>

37
src/mycomponents/job/jobTop.vue

@ -1,5 +1,5 @@
<template>
<view class="task_top">
<view class="task_item">
<view class="uni-flex space-between u-col-center align-center" >
<job-number :number="dataContent.number"></job-number>
<job-status :jobStatus="dataContent.status"></job-status>
@ -7,34 +7,21 @@
</view>
</template>
<script>
<script setup lang="ts">
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
export default {
components: {
jobNumber,
jobStatus
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
data() {
return {
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
})
const openDetail = (item) => {
emit("openDetail", dataContent.value);
}
//
const emit = defineEmits(['openDetail'])
</script>
<style lang="scss">

58
src/mycomponents/job/jobTopAsn.vue

@ -1,42 +1,28 @@
<template>
<view class="task_top">
<view class="uni-flex space-between u-col-center align-center" >
<job-number v-if="dataContent.asnNumber==null || dataContent.asnNumber==''" :number="dataContent.requestNumber"></job-number>
<job-number v-else :number="dataContent.asnNumber"></job-number>
<job-status :jobStatus="dataContent.status"></job-status>
</view>
</view>
<view class="task_item">
<view class="uni-flex space-between u-col-center align-center">
<job-number v-if="dataContent.asnNumber == null || dataContent.asnNumber == ''" :number="dataContent.requestNumber"></job-number>
<job-number v-else :number="dataContent.asnNumber"></job-number>
<job-status :jobStatus="dataContent.status"></job-status>
</view>
</view>
</template>
<script>
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
export default {
components: {
jobNumber,
jobStatus
},
data() {
return {
<script setup lang="ts">
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
const openDetail = (item) => {
emit('openDetail', props.dataContent)
}
//
const emit = defineEmits(['openDetail'])
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

65
src/mycomponents/jobList/jobList.vue

@ -0,0 +1,65 @@
<template>
<view class="wyf">
<u-popup v-model="show" mode="center" width="600rpx">
<view class="container">
<u-card :title="item.title" v-for="(item, index) in list" :key="item.id" margin="20rpx" :head-style="{ padding: '20rpx' }" :foot-style="{ padding: '0rpx' }">
<template v-slot:body>
<view class=""> 物料代码{{ item.itemCode }} </view>
<view class=""> 物料名称{{ item.itemName }} </view>
</template>
<template v-slot:foot>
<!-- <button class="go" >Go</button> -->
<u-button type="primary" @click="selectItem(item, index)" style="width: 200rpx; height: 60rpx">Go</u-button>
</template>
</u-card>
</view>
</u-popup>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const list = ref([])
const show = ref(false)
const openList = (listParmas) => {
list.value = listParmas
show.value = true
}
const selectItem = (item, index) => {
emit('selectItem', item)
}
//
const emit = defineEmits(['selectItem'])
defineExpose({
openList
})
</script>
<style lang="scss" scoped>
.container {
display: flex;
justify-content: center;
align-items: center;
.list {
width: 80%;
max-height: 80vh;
overflow-y: auto;
border-radius: 10px !important;
.slot-image {
width: 40rpx;
}
.go {
color: rgb(60, 156, 255);
}
}
}
.list ::v-deep .uni-list--border {
border: 1rpx solid #e5e5e5;
}
</style>

85
src/mycomponents/location/location.vue

@ -1,55 +1,42 @@
<template>
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-row space-between u-col-center" >
<view class="location_view" >
<text class="card_location"> 库位 </text>
<text> {{locationCode}}</text>
</view>
<view class="" v-if="recommendQty>0">
<count :countType="'recommend_handle_no_pack'"
:recommendQty="recommendQty"
:handledQty="handledQty"
:uom="uom"></count>
</view>
</view>
</view>
<view class="" style="background-color: #fff">
<view class="uni-flex uni-row space-between u-col-center">
<view class="location_view">
<text class="card_location"> 库位 </text>
<text> {{ locationCode }}</text>
</view>
<view class="" v-if="recommendQty > 0">
<count :countType="'recommend_handle_no_pack'" :recommendQty="recommendQty" :handledQty="handledQty" :uom="uom"></count>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data(){
return {
}
},
props: {
locationInfo:{
type: Object,
default: {}
},
locationCode:{
type: String,
default: ''
},
recommendQty:{
type: Number,
default: 0
},
handledQty:{
type: Number,
default: 0
},
uom:{
type: String,
default: ''
}
},
<script setup lang="ts">
import { ref } from 'vue'
}
const props = defineProps({
locationInfo: {
type: Object,
default: {}
},
locationCode: {
type: String,
default: ''
},
recommendQty: {
type: Number,
default: 0
},
handledQty: {
type: Number,
default: 0
},
uom: {
type: String,
default: ''
}
})
</script>
<style>
</style>
<style></style>

196
src/mycomponents/location/locationCompare.vue

@ -1,126 +1,90 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view class="flex uni-row" v-if="isShowEdit" >
<view >
<text style="font-size: 30rpx;">{{title}}</text>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
<view class="uni-flex u-row u-col-center" @click="showLocation">
<view class="flex u-row" v-if="isShowEdit">
<view>
<text style="font-size: 30rpx">{{ title }}</text>
<text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text>
<text v-if="locationCode" style="font-size: 25rpx;color:#3FBAFF;">&nbsp/&nbsp{{locationCode}}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
<image style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view>
<view class="" v-else>
<view >
<text style="font-size: 30rpx;">{{title}}</text>
<text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
</view>
<text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ recommendLocationCode }}</text>
<text v-if="locationCode" style="font-size: 25rpx; color: #3fbaff">&nbsp/&nbsp{{ locationCode }}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
<image style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
</view>
<view class="" v-else>
<view>
<text style="font-size: 30rpx">{{ title }}</text>
<text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ recommendLocationCode }}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
</view>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text>
</view>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
<view class="uni-flex uni-row center" style="vertical-align: center" v-if="isDevlement()">
<!-- <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> -->
<image style="width: 26rpx; height: 26rpx; margin-top: 6rpx" src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" />
</view>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
<script>
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import config from '@/static/config.js'
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import config from '@/static/config.js'
export default {
components: {
winScanLocation
},
data() {
return {
defaultlocationCode: ""
}
},
props: {
title: {
type: String,
default: "需求库位"
},
recommendLocationCode: {
type: String,
default: ""
},
locationCode: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
}
},
const defaultlocationCode = ref('')
const props = defineProps({
title: {
type: String,
default: '需求库位'
},
recommendLocationCode: {
type: String,
default: ''
},
locationCode: {
type: String,
default: ''
},
isShowEdit: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
}
})
const scanLocationCode = ref()
const showLocation = () => {
if (props.isShowEdit) {
scanLocationCode.value.openScanPopup()
}
}
//
const getLocation = (location, code) => {
emit('getLocation', location, code)
}
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = props.recommendLocationCode
watch: {
// locationCode: {
// handler(newName, oldName) {
// if (this.locationCode != "") {
// this.defaultlocationCode = this.locationCode;
// }
// },
// immediate: true,
// deep: true
// }
},
methods: {
showLocation() {
if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup();
}
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制库位成功'
})
}
})
}
const isDevlement = () => {
return config.isDevelopment
}
},
//
getLocation(location, code) {
this.$emit("getLocation", location, code)
},
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = this.recommendLocationCode;
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制库位成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制库位成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
//
const emit = defineEmits(['getLocation'])
</script>
<style>
</style>
<style></style>

70
src/mycomponents/location/locationDetail.vue

@ -1,47 +1,35 @@
<template>
<view class="cen_card" style="background-color: #fff;">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">仓库</view>
<view>{{dataContent.warehouseCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库区</view>
<view>{{dataContent.areaCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库位组</view>
<view>{{ dataContent.locationGroupCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">ERP储位</view>
<view>{{ dataContent.erpLocationCode }}</view>
</view>
</view>
</view>
<view class="cen_card" style="background-color: #eef4fa">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">仓库</view>
<view>{{ dataContent.warehouseCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库区</view>
<view>{{ dataContent.areaCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库位组</view>
<view>{{ dataContent.locationGroupCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">ERP储位</view>
<view>{{ dataContent.erpLocationCode }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'comItemLocationCenter',
components: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
data() {
return {}
},
created() {
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
},
methods: {
}
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
</script>
<style>
</style>
<style></style>

63
src/mycomponents/location/locationInfo.vue

@ -1,45 +1,32 @@
<!--库位组件-->
<template>
<view class="" >
<view class="" style="background-color: #fff;">
<view class="uni-flex space-between" style="padding: 20rpx;">
<view class="" >
<text class="font_xl text_black text_bold">{{locationDetail.code}}</text>
</view>
<view class="">
<location-status :type="locationDetail.type" ></location-status>
</view>
</view>
<location-detail :dataContent="locationDetail"></location-detail>
</view>
</view>
<view class="">
<view class="" style="background-color: #fff">
<view class="uni-flex space-between" style="padding: 20rpx">
<view class="">
<text class="font_xl text_black text_bold">{{ locationDetail.code }}</text>
</view>
<view class="">
<location-status :type="locationDetail.type"></location-status>
</view>
</view>
<view class="" style="padding: 0px 20rpx">
<location-detail-com :dataContent="locationDetail"></location-detail-com>
</view>
</view>
</view>
</template>
<script>
import locationDetail from '@/mycomponents/location/locationDetail.vue'
import locationStatus from '@/mycomponents/location/locationStatus.vue'
export default {
name: "comlocation",
components: {
locationDetail,
locationStatus,
},
data() {
return {
<script setup lang="ts">
import locationDetailCom from '@/mycomponents/location/locationDetail.vue'
import locationStatus from '@/mycomponents/location/locationStatus.vue'
};
},
//
props: {
locationDetail: {
type: Object,
value: null
}
},
methods:{
}
}
const props = defineProps({
locationDetail: {
type: Object,
value: null
}
})
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

66
src/mycomponents/location/locationStatus.vue

@ -1,46 +1,30 @@
<template>
<view class="">
<text :class="statusStyle(type)" style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(type)}}</text>
</view>
<view class="">
<text :class="statusStyle(type)" style="padding-top: 5rpx; padding-bottom: 5rpx; padding-left: 15rpx; padding-right: 15rpx">{{ statusDesc(type) }}</text>
</view>
</template>
<script>
import {
getLocationTypeInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
};
},
props: {
dataContent: {
type: Object,
default: {},
},
type: {
type: String,
default: "",
},
},
methods: {
statusDesc(code) {
return getLocationTypeInfo(code).label
},
statusStyle(code) {
return getLocationTypeInfo(code).remark;
},
}
}
<script setup lang="ts">
import { getLocationTypeInfo } from '@/common/directory.js'
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
type: {
type: String,
default: ''
}
})
const statusDesc = (code) => {
return getLocationTypeInfo(code).label
}
const statusStyle = (code) => {
return getLocationTypeInfo(code).remark
}
</script>
<style>
</style>
<style></style>

118
src/mycomponents/location/requiredLocation.vue

@ -1,79 +1,53 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view>
{{title}}
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text>
</view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view style="font-size: 30rpx">
{{ title }}
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<text style="font-size: 25rpx; color: #3fbaff" v-if="locationCode == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ locationCode }}</text>
</view>
<image v-if="isShowEdit" style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
<script>
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
<script setup lang="ts">
import { ref } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default {
components: {
winScanLocation
},
data() {
return {
defaultlocationCode: ""
}
},
props: {
title: {
type: String,
default: "需求库位"
},
locationCode: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
}
},
const props = defineProps({
title: {
type: String,
default: '需求库位'
},
locationCode: {
type: String,
default: ''
},
isShowEdit: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
}
})
const scanLocationCode = ref()
const showLocation = () => {
if (props.isShowEdit) {
scanLocationCode.value.openScanPopup()
}
}
//
const getLocation = (location, code) => {
emit('getLocation', location, code)
}
watch: {
// locationCode: {
// handler(newName, oldName) {
// if (this.locationCode != "") {
// this.defaultlocationCode = this.locationCode;
// }
// },
// immediate: true,
// deep: true
// }
},
methods: {
showLocation() {
if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup();
}
},
//
getLocation(location, code) {
this.$emit("getLocation", location, code)
}
}
}
//
const emit = defineEmits(['getLocation'])
</script>
<style>
</style>
<style></style>

179
src/mycomponents/package/packageCard.vue

@ -4,9 +4,10 @@
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> -->
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
@ -14,23 +15,23 @@
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
</view>
<view class="uni-flex uni-row" style="word-break: break-all;">
<view class="uni-flex uni-row " style="word-break: break-all;align-items:center">
<!-- ||dataContent.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="dataContent.handleQty==null || dataContent.handleQty==undefined" :dataContent="dataContent"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<recommend-qty v-if="dataContent.handleQty==null || dataContent.handleQty==undefined"
:dataContent="dataContent" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(dataContent.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text>
<view v-if="isDevlement()">
<image style='width: 26rpx;height: 26rpx;margin-top: 44rpx;' src="/static/icons/icon_copy.svg" alt="" @click="copy"/>
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
@ -39,117 +40,71 @@
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
const props = defineProps({
dataContent: {
type: Object,
default: null
},
data() {
return {
}
isShowContainer: {
type: Boolean,
default: true
},
props: {
dataContent: {
type: Object,
default: null
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
isShowPack: {
type: Boolean,
default: true
},
watch: {
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
}
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
}
})
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
})
}
const isDevlement = () => {
return config.isDevelopment;
}
</script>

417
src/mycomponents/package/packageDetailPopup.vue

@ -1,204 +1,227 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
<view v-for="(item, index) in dataList" style="width: 100%;">
<view class="item">
<text class="item_title">{{item.item_title}} </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}}</text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
</view>
</view>
</scroll-view>
<u-popup mode="bottom" v-model="show">
<view class="pop_detail" style="height: 80%">
<com-item :dataContent="dataContent"></com-item>
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<view v-for="(item, index) in dataList" style="width: 100%">
<view class="item">
<text class="item_title">{{ item.item_title }} </text>
<text v-if="item.type == '' || item.type == undefined" class="text_wrap">{{ item.content }}</text>
<text v-else-if="item.type == 'dateTime'" class="text_wrap">{{ formatDate(item.content) }} </text>
</view>
</view>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</u-popup>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import { dateFormat } from '@/common/basic.js';
export default {
emits: ['onClose'],
components: {
comItem
},
data() {
return {
dataContent: {
type: Object,
default: {}
},
dataList: []
}
},
<script setup lang="ts">
import { ref } from 'vue'
import comItem from '@/mycomponents/item/item.vue'
import { dateFormat } from '@/common/basic.js'
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
this.getDataList();
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closePopup(val) {
this.$refs.popup.close('bottom')
// this.$emit('onClose')
},
getDataList() {
// console.log(JSON.stringify(this.dataContent));
this.dataList.length = 0;
this.dataList.push(...[{
item_title: '包装号',
content: this.dataContent.number
}, {
item_title: '物料代码',
content: this.dataContent.itemCode
}, {
item_title: '物品名称',
content: this.dataContent.itemName
}, {
item_title: '物品描述1',
content: this.dataContent.itemDesc1
}, {
item_title: '物品描述2',
content: this.dataContent.itemDesc2
}, {
item_title: '批次',
content: this.dataContent.batch
}, {
item_title: '替代批次',
content: this.dataContent.altBatch
}, {
item_title: '生产日期',
content: this.dataContent.produceDate,
type:"dateTime"
}, {
item_title: '有效日期',
content: this.dataContent.validityDays,
type:"dateTime"
}, {
item_title: '失效日期',
content: this.dataContent.expireDate,
type:"dateTime"
}, {
item_title: '计量单位',
content: this.dataContent.uom,
type:"uom"
}, {
item_title: '数量',
content: this.dataContent.qty
}, {
item_title: '替代计量单位',
content: this.dataContent.altUom
}, {
item_title: '替代数量',
content: this.dataContent.altQty
}, {
item_title: '转换率',
content: this.dataContent.convertRate
}, {
item_title: '标包数量',
content: this.dataContent.packQty
}, {
item_title: '标包单位',
content: this.dataContent.packUnit
}, {
item_title: '仓库代码',
content: this.dataContent.toWarehouseCode
}, {
item_title: '月台代码',
content: this.dataContent.toDockCode
}, {
item_title: '库位代码',
content: this.dataContent.toLocationCode
}, {
item_title: '供应商代码',
content: this.dataContent.supplierCode
}, {
item_title: '供应商物品代码',
content: this.dataContent.supplierItemCode
}, {
item_title: '采购订单号',
content: this.dataContent.poNumber
}, {
item_title: '采购订单行',
content: this.dataContent.poLine
}, {
item_title: '采购计划单号',
content: this.dataContent.rpNumber
}, {
item_title: '发货单号',
content: this.dataContent.asnNumber
}, {
item_title: '生产订单号',
content: this.dataContent.woNumber
}, {
item_title: '生产订单行',
content: this.dataContent.woLine
}, {
item_title: '生产线代码',
content: this.dataContent.productionLineCode
}, {
item_title: '班组代码',
content: this.dataContent.teamCode
}, {
item_title: '班次代码',
content: this.dataContent.shiftCode
}, {
item_title: '客户代码',
content: this.dataContent.customerCode
}, {
item_title: '客户月台代码',
content: this.dataContent.customerDockCode
}, {
item_title: '客户物品代码',
content: this.dataContent.customerItemCode
}, {
item_title: '销售订单号',
content: this.dataContent.soNumber
}, {
item_title: '销售订单行',
content: this.dataContent.soLine
}, {
item_title: '质量等级',
content: this.dataContent.eqLevel
}, {
item_title: '货主代码',
content: this.dataContent.ownerCode
}, {
item_title: '重量',
content: this.dataContent.weight
}, {
item_title: '面积',
content: this.dataContent.area
}, {
item_title: '体积',
content: this.dataContent.volume
}]);
},
formatDate(val) {
return dateFormat(val)
},
}
}
const dataContent = ref({})
const dataList = ref([])
const show = ref(false)
const openPopup = (val) => {
dataContent.value = val
getDataList()
setTimeout((res) => {
show.value = true
}, 500)
}
const closePopup = () => {
show.value = false
}
const getDataList = () => {
// console.log(JSON.stringify( dataContent));
dataList.value.length = 0
dataList.value.push(
...[
{
item_title: '包装号',
content: dataContent.value.number
},
{
item_title: '物料代码',
content: dataContent.value.itemCode
},
{
item_title: '物品名称',
content: dataContent.value.itemName
},
{
item_title: '物品描述1',
content: dataContent.value.itemDesc1
},
{
item_title: '物品描述2',
content: dataContent.value.itemDesc2
},
{
item_title: '批次',
content: dataContent.value.batch
},
{
item_title: '替代批次',
content: dataContent.value.altBatch
},
{
item_title: '生产日期',
content: dataContent.value.produceDate,
type: 'dateTime'
},
{
item_title: '有效日期',
content: dataContent.value.validityDays,
type: 'dateTime'
},
{
item_title: '失效日期',
content: dataContent.value.expireDate,
type: 'dateTime'
},
{
item_title: '计量单位',
content: dataContent.value.uom,
type: 'uom'
},
{
item_title: '数量',
content: dataContent.value.qty
},
{
item_title: '替代计量单位',
content: dataContent.value.altUom
},
{
item_title: '替代数量',
content: dataContent.value.altQty
},
{
item_title: '转换率',
content: dataContent.value.convertRate
},
{
item_title: '标包数量',
content: dataContent.value.packQty
},
{
item_title: '标包单位',
content: dataContent.value.packUnit
},
{
item_title: '仓库代码',
content: dataContent.value.toWarehouseCode
},
{
item_title: '月台代码',
content: dataContent.value.toDockCode
},
{
item_title: '库位代码',
content: dataContent.value.toLocationCode
},
{
item_title: '供应商代码',
content: dataContent.value.supplierCode
},
{
item_title: '供应商物品代码',
content: dataContent.value.supplierItemCode
},
{
item_title: '采购订单号',
content: dataContent.value.poNumber
},
{
item_title: '采购订单行',
content: dataContent.value.poLine
},
{
item_title: '采购计划单号',
content: dataContent.value.rpNumber
},
{
item_title: '发货单号',
content: dataContent.value.asnNumber
},
{
item_title: '生产订单号',
content: dataContent.value.woNumber
},
{
item_title: '生产订单行',
content: dataContent.value.woLine
},
{
item_title: '生产线代码',
content: dataContent.value.productionLineCode
},
{
item_title: '班组代码',
content: dataContent.value.teamCode
},
{
item_title: '班次代码',
content: dataContent.value.shiftCode
},
{
item_title: '客户代码',
content: dataContent.value.customerCode
},
{
item_title: '客户月台代码',
content: dataContent.value.customerDockCode
},
{
item_title: '客户物品代码',
content: dataContent.value.customerItemCode
},
{
item_title: '销售订单号',
content: dataContent.value.soNumber
},
{
item_title: '销售订单行',
content: dataContent.value.soLine
},
{
item_title: '质量等级',
content: dataContent.value.eqLevel
},
{
item_title: '货主代码',
content: dataContent.value.ownerCode
},
{
item_title: '重量',
content: dataContent.value.weight
},
{
item_title: '面积',
content: dataContent.value.area
},
{
item_title: '体积',
content: dataContent.value.volume
}
]
)
}
const formatDate = (val) => {
return dateFormat(val)
}
defineExpose({
openPopup,
closePopup
})
</script>
<style>
</style>
<style></style>

324
src/mycomponents/package/packageList.vue

@ -1,34 +1,37 @@
<template>
<view class="">
<view class="" v-for="(item,index) in dataContent" :key="item.id">
<uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false">
<u-collapse ref="collapse2" >
<u-collapse-item :disabled="false" @change="collapseChange">
<template v-slot:title>
<package-card :dataContent="item" :isShowLocation="false"
:isShowFromLocation="isShowFromLocation"></package-card>
:isShowFromLocation="isShowFromLocation" style='flex:1'></package-card>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id"
style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action>
<uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options"
@click="swipeClick($event,pack)">
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></package-card>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<u-swipe-action :show="item.show" :index="index" v-for="(cur,key) in item.packList"
:key="index" :options="(cur.scaned&&isEdit)?editAndRemoveOptions : cur.scaned? removeOptions:options"
bg-color='rgba(255,255,255,0)'
@click="(...event)=>swipeClick($event,cur)"
>
<package-card :dataContent="cur" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></package-card>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
</view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="comMessage"></comMessage>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
onMounted,
nextTick
} from 'vue'
import config from '@/static/config.js'
import packageCard from '@/mycomponents/package/packageCard.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
@ -37,173 +40,152 @@
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ["collapseChange", "updateData"],
components: {
packageCard,
recommendQtyEdit
const editItem = ref({})
const options = ref([])
const removeOptions = ref([])
const editAndRemoveOptions = ref([])
const comMessageRef = ref()
const collapse2 = ref()
onMounted(() => {
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value = getEditRemoveOption()
});
const props = defineProps({
dataContent: {
type: Object,
default: null
},
data() {
return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
isShowContainer: {
type: Boolean,
default: true
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
isShowPack: {
type: Boolean,
default: true
},
props: {
dataContent: {
type: Object,
default: null
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
settingParam: {
type: Object,
default: null
},
isEdit: {
type: Boolean,
default: false
}
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
watch: {
locationTitle: {
type: String,
default: '库位'
},
methods: {
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
settingParam: {
type: Object,
default: null
},
isEdit: {
type: Boolean,
default: false
}
})
const dataContent = ref(props.dataContent)
dataContent.value.forEach(item=>{
item.packList.forEach(cur=>{
cur.show = false
})
})
console.log(dataContent.value)
const swipeClick=(params,cur)=> {
let text = ''
if(cur.scaned&&props.isEdit){
text = editAndRemoveOptions[params[1]].text
// (cur.scaned&&isEdit)?editAndRemoveOptions : cur.scaned? removeOptions:options
}else{
if(cur.scaned){
text = removeOptions[params[1]].text
}else{
text = options[params[1]].text
}
}
if (text == "编辑") {
edit(cur)
} else if (text == "移除") {
remove(cur)
}
}
const remove=(item)=> {
comMessageRef.value.showQuestionMessage("确定移除扫描信息?", res => {
if (res) {
item.scaned = false
item.handleQty = null;
emit('updateData')
}
},
remove(item) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null;
this.$emit('updateData')
this.$forceUpdate()
}
});
},
});
}
const edit=(item)=> {
editItem.value = item;
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
collapseChange() {
this.$emit("collapseChange");
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse2.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
}
const collapseChange=()=> {
resizeCollapse();
emit("collapseChange");
}
const resizeCollapse=()=> {
nextTick(()=>{
collapse2.value.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.init();
})
});
this.$forceUpdate();
},
});
}
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
// #endif
},
isDevlement() {
return config.isDevelopment;
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit("updateData")
}
})
}
const copyPro = () =>{
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
}
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
}
const isDevlement=()=> {
return config.isDevelopment;
}
const confirm=(qty)=> {
editItem.value.handleQty = qty;
emit("updateData")
}
//
const emit = defineEmits(['collapseChange', 'updateData'])
</script>
<style>

195
src/mycomponents/package/packageRecordCard.vue

@ -4,9 +4,10 @@
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> -->
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
@ -14,22 +15,23 @@
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
</view>
<view class="uni-flex uni-row" style="word-break: break-all;">
<qty v-if="true" :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<view class="uni-flex uni-row" style="word-break: break-all;">
<qty v-if="true" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus">
</qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowPack="isShowPack">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text>
<!-- <text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text> -->
<image style='width: 26rpx;height: 26rpx;' src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" />
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import qty from '@/mycomponents/qty/qty.vue'
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
@ -40,127 +42,80 @@
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty,
balanceQty,
qty
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
data() {
return {
}
isShowContainer: {
type: Boolean,
default: true
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
isShowBalanceQty: {
type: Boolean,
default: true
},
showPack: {
type: Boolean,
default: false
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
watch: {
locationTitle: {
type: String,
default: '库位'
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
isShowBalanceQty: {
type: Boolean,
default: true
},
showPack: {
type: Boolean,
default: false
}
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
}
})
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
})
}
const isDevlement = () => {
return config.isDevelopment;
}
</script>

278
src/mycomponents/package/packageRecordList.vue

@ -1,29 +1,33 @@
<template>
<view class="">
<view class="" v-for="(item,index) in dataContent" :key="item.id">
<uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false">
<u-collapse ref="collapse2">
<u-collapse-item :disabled="false" @change="collapseChange">
<template v-slot:title>
<packageRecordCard :dataContent="item" :isShowLocation="false"
:isShowFromLocation="false"></packageRecordCard>
:isShowFromLocation="false" style='flex:1'></packageRecordCard>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action-item :right-options="editAndRemoveOptions"
@click="swipeClick($event,pack)">
<packageRecordCard :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></packageRecordCard>
</uni-swipe-action-item>
</view>
</uni-collapse-item>
</uni-collapse>
<u-swipe-action :show="item.show" :index="index" v-for="(item,index) in item.packList"
:key="index" :options="editAndRemoveOptions" bg-color='rgba(255,255,255,0)'
@click="(...event) =>swipeClick(event,item)">
<packageRecordCard :dataContent="item" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></packageRecordCard>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
onMounted,
nextTick
} from 'vue'
import config from '@/static/config.js'
import packageRecordCard from '@/mycomponents/package/packageRecordCard.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
@ -32,159 +36,123 @@
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ["collapseChange"],
components: {
packageRecordCard,
balanceQtyEdit
},
data() {
return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions:[]
}
onMounted(()=>{
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value =getEditRemoveOption()
})
const props = defineProps({
dataContent: {
type: Object,
default: null
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions =getEditRemoveOption()
isShowContainer: {
type: Boolean,
default: true
},
props: {
dataContent: {
type: Object,
default: null
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
settingParam: {
type: Object,
default: null
},
isEdit:{
type: Boolean,
default: false
}
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
watch: {
locationTitle: {
type: String,
default: '库位'
},
settingParam: {
type: Object,
default: null
},
methods: {
swipeClick(e, item) {
if (e.content.text == "编辑") {
// this.edit(item)
}
},
// edit(item) {
// this.editItem = item;
// this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty);
// },
collapseChange() {
this.$emit("collapseChange");
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse2.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
isEdit:{
type: Boolean,
default: false
}
});
this.$forceUpdate();
},
})
const editItem = ref({})
const options = ref([])
const removeOptions = ref([])
const editAndRemoveOptions = ref([])
const collapse2 = ref([])
const dataContent = ref(props.dataContent)
dataContent.value.forEach(item=>{
item.packList.forEach(cur=>{
cur.show= false
})
})
const swipeClick=(e, item) =>{
if (e.content.text == "编辑") {
// this.edit(item)
}
}
const collapseChange=()=> {
emit("collapseChange");
resizeCollapse();
}
const resizeCollapse=()=> {
nextTick(r => {
collapse2.value.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.init();
})
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
});
}
const copy=()=> {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.detail.itemCode + ";P" + props.detail.packingNumber + ";B" + props.detail
.batch + ";Q" + props.detail.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
}
})
}
const copyPro=()=> {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.detail.itemCode + ";P" + props.detail.packingNumber + ";B" + props.detail
.batch + ";Q" + props.detail.qty
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
// #endif
},
isDevlement() {
return config.isDevelopment;
},
confirm(qty){
this.editItem.qty =qty;
this.$emit('updateData')
}
}
})
}
const isDevlement=()=> {
return config.isDevelopment;
}
const confirm=(qty)=>{
editItem.value.qty =qty;
emit('updateData')
}
//
const emit = defineEmits(['collapseChange', 'updateData'])
</script>
<style>

86
src/mycomponents/package/packageTarget.vue

@ -1,57 +1,41 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;background-color: #fff;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" @click="showPack">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="packingNumber==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{packingNumber}}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"
></image>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ"></win-scan-pack>
</view>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx; background-color: #fff">
<text style="font-size: 30rpx">{{ title }} </text>
<view class="uni-flex u-col-center" @click="showPack">
<text style="color: #3fbaff; font-size: 25rpx" v-if="packingNumber == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="color: #3fbaff; font-size: 25rpx">&nbsp {{ packingNumber }}</text>
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image>
</view>
<win-scan-pack ref="scanPopup" @getResult="getScanResult" headerType="HPQ"></win-scan-pack>
</view>
</template>
<script>
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
components: {
winScanPack
},
data() {
return {
}
},
props: {
title: {
type: String,
default: "需求库位"
},
packingNumber: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
}
},
<script setup lang="ts">
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
watch: {
},
methods: {
showPack() {
this.$refs.scanPopup.openScanPopup();
},
getScanResult(result) {
this.$emit("getScanResult", result)
}
}
}
const props = defineProps({
title: {
type: String,
default: '需求库位'
},
packingNumber: {
type: String,
default: ''
},
isShowEdit: {
type: Boolean,
default: true
}
})
const showPack = () => {
scanPopup.value.openScanPopup()
}
const getScanResult = (result) => {
emit('getScanResult', result)
}
//
const emit = defineEmits(['result'])
</script>
<style>
</style>
<style></style>

194
src/mycomponents/popup/selectList.vue

@ -1,116 +1,96 @@
<template>
<uni-popup ref="popupItems">
<com-popup @onClose="closePopup">
<view class="uni-center" style="position: relative;height:900rpx ;">
<view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;">
选择物料
</view>
<u-line/>
<view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;">
<view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" >
<view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)">
({{index+1}}) 物料: {{item.itemCode}}
</view>
<u-line/>
</view>
</view>
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;">
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" >
<view class="">
当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }}
</view>
</view>
<view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view>
</view>
</view>
</com-popup>
</uni-popup>
<u-popup v-model="isShow" mode="center">
<com-popup @onClose="closePopup">
<view class="uni-center" style="position: relative; height: 900rpx; width: 600rpx">
<view class="" style="position: absolute; font-size: 38rpx; height: 50rpx; margin-top: 10rpx; margin-bottom: 10rpx; left: 0; top: 0; right: 0"> 选择物料 </view>
<u-line />
<view class="" style="position: absolute; height: 720rpx; font-size: 40rpx; top: 70rpx; bottom: 80rpx; left: 0; right: 0">
<view style="margin: 15rpx; text-align: left" v-for="(item, index) in showList" :key="index">
<view class="" style="padding: 10rpx; font-size: 30rpx" @click="selectItem(item)"> ({{ index + 1 }}) 物料: {{ item.itemCode }} </view>
<u-line />
</view>
</view>
<view class="" style="position: absolute; height: 80rpx; left: 0; bottom: 0; right: 0">
<view class="flex uni-center" style="width: 100%; justify-content: center; margin-top: 10rpx; margin-bottom: 10rpx">
<view class=""> 当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }} </view>
</view>
<view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view>
</view>
</view>
</com-popup>
</u-popup>
</template>
<script>
import {
getCustomerItemList
} from '@/api/request2.js';
import comPopup from '@/mycomponents/common/comPopup.vue'
export default {
emits: ["selectedItem"],
components: {
comPopup,
},
props: {
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { getCustomerItemList } from '@/api/request2.js'
import comPopup from '@/mycomponents/common/comPopup.vue'
},
data() {
return {
showList: [],
pageCurrent:1,
pageSize:10,
total:0
const showList = ref([])
const pageCurrent = ref(1)
const pageSize = ref(10)
const total = ref(0)
const isShow = ref(false)
const queryList = (lineCode) => {
const filters = []
filters.push({
column: 'customerCode',
action: '==',
value: lineCode
})
}
},
methods: {
queryList(lineCode){
var filters =[]
filters.push({
column: "customerCode",
action: "==",
value: lineCode
})
const params = {
filters,
pageNo: pageCurrent.value,
pageSize: pageSize.value
}
getCustomerItemList(params)
.then((res) => {
if (res.data != null && res.data.list.length > 0) {
showList.value = res.data.list
total.value = res.data.total
isShow.value = true
} else {
// 线
// this.showErrorMessage('线' + lineCode + '');
isShow.value = true
}
})
.catch((error) => {
// this.showErrorMessage(error);
})
}
const openPopup = (items) => {
showList.value = items
isShow.value = true
}
const closePopup = () => {
isShow.value = false
}
const selectItem = (item) => {
emit('selectedItem', item)
isShow.value = false
}
const change = (e) => {
pageCurrent.value = e.current
}
var params = {
filters: filters,
pageNo: this.pageCurrent,
pageSize: this.pageSize,
}
getCustomerItemList(params).then(res => {
if (res.data != null && res.data.list.length > 0) {
this.showList = res.data.list;
this.total = res.data.total;
this.$forceUpdate()
this.$refs['popupItems'].open("center");
} else {
//线
// this.showErrorMessage('线' + lineCode + '');
this.$refs['popupItems'].open("center");
}
}).catch(error => {
// this.showErrorMessage(error);
})
},
openPopup(items) {
this.showList = items;
this.$refs['popupItems'].open("center");
},
closePopup() {
this.$refs.popupItems.close()
},
selectItem(item) {
this.$emit("selectedItem", item);
this.$refs['popupItems'].close();
},
change(e){
this.pageCurrent = e.current
console.log("分页",e.current)
}
}
}
//
const emit = defineEmits(['selectedItem'])
defineExpose({
queryList
})
</script>
<style>
.fixed-bottom {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff;
padding: 10px 0;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
.fixed-bottom {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff;
padding: 10px 0;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
</style>

50
src/mycomponents/production/productionInfo.vue

@ -1,39 +1,21 @@
<template>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">生产线</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.productionLineCode}}</text>
</view>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">生产日期</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.produceDate}}</text>
</view>
<view class="pack_view uni-inline-item">
<text style="color: #606266; font-size: 13px">生产线</text>
<text style="color: #606266; font-size: 13px">{{ dataContent.productionLineCode }}</text>
</view>
<view class="pack_view uni-inline-item">
<text style="color: #606266; font-size: 13px">生产日期</text>
<text style="color: #606266; font-size: 13px">{{ dataContent.produceDate }}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
}
},
watch: {
},
methods: {
}
}
<script setup lang="ts">
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
})
</script>
<style>
</style>
<style></style>

68
src/mycomponents/qty/balanceQty.vue

@ -6,7 +6,6 @@
{{Number(dataContent.qty)}}
</text>
</view>
<!-- v-if="dataContent.packQty==undefined" -->
<uom :uom="dataContent.uom"></uom>
</view>
<view class="uni-flex uni-row center">
@ -15,61 +14,38 @@
</view>
</template>
<script>
import packQty from '@/mycomponents/qty/packQty.vue'
<script setup lang="ts">
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
packQty,
uom,
status,
packUnit
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
},
data() {
return {
};
dataContent: {
type: Object,
default: {}
},
//
props: {
type: {
type: String,
default: 'default' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
recommendQty: {
type: Number,
default: 0
},
handleQty: {
type: Number,
default: 0
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
recommendQty: {
type: Number,
default: 0
},
watch: {
handleQty: {
type: Number,
default: 0
},
methods: {
isShowStatus: {
type: Boolean,
default: true
},
}
isShowStdPack: {
type: Boolean,
default: true
}
})
</script>
<style lang="scss">

395
src/mycomponents/qty/balanceQtyEdit.vue

@ -1,215 +1,204 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box>
<uom :uom="dataContent.uom"></uom>
<!-- <uom :uom="dataContent.packUnit"></uom> -->
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.packQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="">
<u-popup v-model="show" mode="bottom">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding: 10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx">
{{ title }}
</view>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white; height: 60%">
<view class="uni-flex uni-column">
<view class="uni-flex uni-row space-between padding title">
<text>包装数量 : </text>
<view class="uni-flex uni-row u-col-center">
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box>
<!-- <uom :uom="dataContent.uom"></uom> -->
</view>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{ Number(dataContent.packQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center"
style="padding-left: 30rpx;">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus"
:allowEdit='allowEditStatus' @updateStatus="updateStatus">
</balanceStatus>
</view>
</view>
<view class='split_line'></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<input class="qty_input" v-model="allQty" :focus="true" type="number" @confirm="confirm()" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="split_line"></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" style="padding-left: 30rpx">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="allowEditStatus" @updateStatus="updateStatus"> </balanceStatus>
</view>
</view>
<view class="split_line"></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</u-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
<script setup lang="ts">
import { ref, getCurrentInstance, watch } from 'vue'
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
export default {
components: {
uom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 0,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
originalInventoryStatus: "",
dataContent: {},
handleQty: 0,
maxlength: 10
}
},
watch: {
},
created() {
},
props: {
title: {
type: String,
default: "编辑数量"
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
}
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
},
openEditPopup(item, handleQty) {
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus
this.originalInventoryStatus =this.dataContent.inventoryStatus;
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = handleQty
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.dataContent.inventoryStatus = this.originalInventoryStatus;
this.closeEditPopup();
},
calcQty(val) {
if (val > 0) {
this.allQty = val * Number(this.dataContent.packQty);
}
},
setValue() {
var balanceQty = Number(this.dataContent.balanceQty);
if (this.allQty == 0) {
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0',
res => {
this.allQty = balanceQty;
})
} else if (this.allQty > balanceQty) {
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']',
res => {
this.allQty = balanceQty;
})
} else {
this.callback();
}
},
callback() {
let qty = Number(this.allQty);
this.dataContent.handleQty = qty;
if (this.allowEditStatus) //,
{
this.dataContent.toInventoryStatus = this.inventoryStatus;
}
this.$emit("confirm", qty);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
console.log(this.inventoryStatus)
}
}
}
const props = defineProps({
title: {
type: String,
default: '编辑数量'
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
}
})
const allQty = ref(0)
const stdCount = ref(0)
const inventoryStatus = ref('')
const originalInventoryStatus = ref('')
const dataContent = ref({})
const maxlength = ref(10)
const show = ref(false)
const comMessageRef = ref()
const toInventoryStatus = ref()
watch(
() => allQty.value,
(newVal) => {
if (newVal % Number(dataContent.value.packQty) > 0) {
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty)) + 1
} else {
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty))
}
}
)
const checkNum = (e) => {
const { value } = e.detail
const dot = value.indexOf('.') //
const reg = /^[0-9]+$/ //
if (dot > -1) {
maxlength.value = dot + 7 //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) {
//
maxlength.value = 10
}
}
const openEditPopup = (item, handleQty) => {
dataContent.value = item
inventoryStatus.value = dataContent.value.inventoryStatus
originalInventoryStatus.value = dataContent.value.inventoryStatus
toInventoryStatus.value = dataContent.value.toInventoryStatus
allQty.value = handleQty
setTimeout((res) => {
show.value = true
}, 500)
}
const closeEditPopup = () => {
show.value = false
}
const confirm = () => {
setValue()
}
const cancel = () => {
dataContent.value.inventoryStatus = originalInventoryStatus.value
closeEditPopup()
}
const calcQty = (e) => {
if (e.value > 0) {
allQty.value = e.value * Number(dataContent.value.packQty)
}
}
const setValue = () => {
const balanceQty = Number(dataContent.value.balanceQty)
if (allQty.value == 0) {
comMessageRef.value.showErrorMessage('数量必须大于0', (res) => {
if (res) {
allQty.value = balanceQty
}
})
} else if (allQty.value > balanceQty) {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于库存数量[${balanceQty}]`, (res) => {
if (res) {
allQty.value = balanceQty
}
})
} else {
callback()
}
}
const callback = () => {
const qty = Number(allQty.value)
dataContent.value.handleQty = qty
if (props.allowEditStatus) {
// ,
dataContent.value.toInventoryStatus = inventoryStatus.value
}
emit('confirm', qty)
closeEditPopup()
}
const updateStatus = (value) => {
inventoryStatus.value = value
}
//
const emit = defineEmits(['confirm', 'clearResult'])
defineExpose({ openEditPopup, closeEditPopup })
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
.title {
font-size: 30rpx;
}
</style>

101
src/mycomponents/qty/compareQty.vue

@ -1,10 +1,10 @@
<template>
<view >
<view>
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view class="uni-flex uni-row ">
<view class="u-flex u-row center">
<view class="u-flex u-row ">
<view v-if="Number(handleQty)!=0">
<view v-if="isShowRecommendQty">
<view v-if="isShowRecommendQty" style='font-weight:bold'>
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
</view>
@ -30,79 +30,62 @@
</view>
<uom :uom="dataContent.uom">
</uom>
<!-- <uom v-show="Number(handleQty)!=0||(isShowRecommendQty&&Number(recommendQty)>0)" :uom="dataContent.uom">
</uom> -->
</view>
<view>
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
<!-- <std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> -->
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {
watch
} from 'vue'
// import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
// packQty,
packUnit,
uom,
status
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
},
data() {
return {
};
dataContent: {
type: Object,
default: null
},
//
props: {
type: {
type: String,
default: 'default' //recommend: compare:
},
dataContent: {
type: Object,
default: null
},
recommendQty: {
type: Number,
default: 0
},
handleQty: {
type: Number,
default: 0
},
isShowStatus: {
type: Boolean,
default: true
},
isShowPackUnit: {
type: Boolean,
default: true
},
isShowRecommendQty: {
type: Boolean,
default: true
}
recommendQty: {
type: Number,
default: 0
},
watch: {
handleQty: {
handler(newName, oldName) {},
immediate: true,
deep: true
}
handleQty: {
type: Number,
default: 0
},
methods: {
isShowStatus: {
type: Boolean,
default: true
},
isShowPackUnit: {
type: Boolean,
default: true
},
}
isShowRecommendQty: {
type: Boolean,
default: true
}
})
watch(
() => props.handleQty,
(val : boolean) => {},
{
immediate: true,
deep: true
}
)
</script>
<style lang="scss">

493
src/mycomponents/qty/countQtyEdit.vue

@ -1,269 +1,238 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box>
<view class="std_pack">
{{getPackUnitInfo(dataContent.packUnit)}}
</view>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.packQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@mousedown="mousedown" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowBalance"
class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title"
style="align-items: center; padding-left: 30rpx;">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit='true'
@updateStatus="updateStatus" @onOpen="clickState">
</balanceStatus>
</view>
</view>
<view class='split_line'></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after"
@click="confirm()">确认({{seconds}}s关闭)</button>
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after"
@click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
<view class="">
<u-popup v-model="show" mode="bottom">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding: 10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx">
{{ title }}
</view>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white; height: 60%">
<view class="uni-flex uni-column">
<view class="uni-flex uni-row space-between padding title">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<!-- <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box> -->
<u-number-box v-model="stdCount" @change="calcQty($event, stdCount)" :focus="false"></u-number-box>
<view class="std_pack">
{{ handleGetPackUnitInfo(dataContent.packUnit) }}
</view>
</view>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{ Number(dataContent.packQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<input class="qty_input" v-model="allQty" :focus="true" type="number" @mousedown="mousedown" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="split_line"></view>
<view v-if="isShowBalance" class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="split_line"></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title" style="align-items: center; padding-left: 30rpx">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="true" @updateStatus="updateStatus" @onOpen="clickState"> </balanceStatus>
</view>
</view>
<view class="split_line"></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认({{ seconds }}s关闭)</button>
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</u-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import {
getPackUnitInfo
} from "@/common/directory.js"
import {
getInventoryStatusName
} from '@/common/directory.js';
export default {
components: {
uom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 0,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
dataContent: {},
handleQty: 0,
seconds: 0,
timer: {},
showConfirmCountdown: false,
detailList: [],
maxlength: 10,
mode: 'add' //add edit
}
},
watch: {
},
created() {
},
props: {
title: {
type: String,
default: "编辑数量"
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
isShowBalance: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
},
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
},
//
openEditPopup(item, detailList) {
this.initData(item, detailList);
// this.dataContent = item
// this.inventoryStatus = this.dataContent.inventoryStatus;
// this.allQty = Number(this.dataContent.qty)
// this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty);
// this.detailList = detailList
this.showConfirmCountdown = false;
this.mode = 'edit';
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
clearInterval(this.timer)
},
//
openEditPopupShowSeconds(item, detailList) {
this.initData(item, detailList);
this.showConfirmCountdown = true;
this.mode = 'add';
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.startTimer()
},
initData(item, detailList) {
this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.handleQty);
this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty);
this.detailList = detailList;
},
mousedown() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
},
clickState() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
},
closeEditPopup() {
clearInterval(this.timer)
this.$emit("close");
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.closeEditPopup();
},
startTimer() {
this.seconds = 3;
clearInterval(this.timer)
this.timer = setInterval(() => {
this.seconds--
if (this.seconds <= 0) {
this.confirm();
// this.cancel()
return
}
}, 1000)
},
calcQty(val) {
if (val > 0) {
this.allQty = val * Number(this.dataContent.packQty);
}
},
setValue() {
this.dataContent.handleQty = Number(this.allQty)
this.$emit("confirm", Number(this.allQty), this.inventoryStatus, this.mode);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
},
getPackUnitInfo(value) {
return getPackUnitInfo(value).name
}
}
}
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import { getPackUnitInfo, getInventoryStatusName } from '@/common/directory.js'
const props = defineProps({
title: {
type: String,
default: '编辑数量'
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
isShowBalance: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
}
})
const allQty = ref(0)
const stdCount = ref(0)
const stateData = ref(0)
const balanceQty = ref(0)
const inventoryStatus = ref('')
const dataContent = ref({})
const handleQty = ref(0)
const seconds = ref(0)
const timer = ref({})
const showConfirmCountdown = ref(false)
const detailList = ref([])
const maxlength = ref(10)
const show = ref(false)
const mode = ref('add') // add edit
const checkNum = (e) => {
const { value } = e.detail
const dot = value.indexOf('.') //
const reg = /^[0-9]+$/ //
if (dot > -1) {
maxlength.value = dot + 7 //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) {
//
maxlength.value = 10
}
}
const openEditPopup = (item, detailList) => {
initData(item, detailList)
showConfirmCountdown.value = false
mode.value = 'edit'
setTimeout((res) => {
show.value = true
}, 500)
clearInterval(timer.value)
}
//
const openEditPopupShowSeconds = (item, detailList) => {
initData(item, detailList)
showConfirmCountdown.value = true
mode.value = 'add'
setTimeout((res) => {
show.value = true
}, 500)
startTimer()
}
const initData = (item, detailListParams) => {
dataContent.value = item
inventoryStatus.value = dataContent.value.inventoryStatus
allQty.value = Number(dataContent.value.handleQty)
stdCount.value = Math.ceil(allQty.value / dataContent.value.packQty)
detailList.value = detailListParams
}
const mousedown = () => {
showConfirmCountdown.value = false
clearInterval(timer.value)
}
const clickState = () => {
showConfirmCountdown.value = false
clearInterval(timer.value)
}
const closeEditPopup = () => {
clearInterval(timer.value)
emit('close')
show.value = false
}
const confirm = () => {
setValue()
}
const cancel = () => {
closeEditPopup()
}
const startTimer = () => {
seconds.value = 3
clearInterval(timer.value)
timer.value = setInterval(() => {
seconds.value--
if (seconds.value <= 0) {
confirm()
// this.cancel()
}
}, 1000)
}
const calcQty = (val) => {
if (val > 0) {
allQty.value = val * Number(dataContent.value.packQty)
}
}
const setValue = () => {
dataContent.value.handleQty = Number(allQty.value)
emit('confirm', Number(allQty.value), inventoryStatus.value, mode.value)
closeEditPopup()
}
const updateStatus = (value) => {
inventoryStatus.value = value
}
const handleGetPackUnitInfo = (value) => {
return getPackUnitInfo(value).name
}
//
const emit = defineEmits(['close', 'confirm'])
defineExpose({
openEditPopupShowSeconds,
openEditPopup
})
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
</style>

28
src/mycomponents/qty/packQty.vue

@ -5,29 +5,19 @@
</text>
</view>
</template>
<script>
<script setup lang="ts">
import {
getPackUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
//
props: {
dataContent: {
packQty: 1000,
uom: "EA",
},
},
methods: {
getPackUnit(packUnit) {
let std = getPackUnitInfo(packUnit);
return std == "" ? packUnit : std.label;
}
const props = defineProps({
dataContent: {
packQty: 1000,
uom: "EA",
}
})
const getPackUnit = (packUnit) => {
let std = getPackUnitInfo(packUnit);
return std == "" ? packUnit : std.label;
}
</script>

49
src/mycomponents/qty/packUnit.vue

@ -2,45 +2,34 @@
<view class="std_pack" v-if="dataContent.packQty!=undefined">
<text>
<!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} -->
{{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}})
{{getPackUnit(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUom(dataContent.uom)}})
</text>
</view>
</template>
<script>
<script setup lang="ts">
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
dataContent: {
packQty: 1000,
uom: "EA",
},
},
methods: {
getUomInfo(uom) {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
},
getPackUnitName(packUnit) {
let unit = getPackUnitName(packUnit);
return unit;
}
const props = defineProps({
dataContent: {
packQty: 1000,
uom: "EA",
}
})
const getUom = (uom) => {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
const getPackUnit = (packUnit) => {
let unit = getPackUnitName(packUnit);
return unit;
}
</script>

94
src/mycomponents/qty/qty.vue

@ -1,64 +1,42 @@
<template>
<view class="center uni-column">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row">
<view class="text_default center">
{{Number(dataContent.qty)}}
</view>
<uom :uom="dataContent.uom"></uom>
</view>
<view class="center uni-column">
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status>
<view class="uni-flex uni-row">
<view class="text_default center">
{{ Number(dataContent.qty) }}
</view>
<uom :uom="dataContent.uom"></uom>
</view>
<view>
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
</view>
</view>
<view>
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
</view>
</view>
</template>
<script setup lang="ts">
import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
<script>
import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
packQty,
status,
uom,
packUnit
},
data() {
return {
};
},
//
props: {
dataContent: {
type: Object,
default: null
},
isShowStatus: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowPackUnit: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
},
}
const props = defineProps({
dataContent: {
type: Object,
default: null
},
isShowStatus: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowPackUnit: {
type: Boolean,
default: true
}
})
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

82
src/mycomponents/qty/recommendQty.vue

@ -2,82 +2,56 @@
<view>
<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view class="u-flex u-row center">
<view class="text_recommend " :style='objTextStyle'>
{{Number(dataContent.qty)}}
</view>
<!-- /{{Number(dataContent.packQty)}} -->
<!-- v-show="!isShowStdPack" -->
<uom :uom="dataContent.uom"></uom>
</view>
<view>
<!-- {{dataContent}} -->
<pack-unit :dataContent="dataContent"></pack-unit>
<!-- <std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> -->
</view>
</view>
</template>
<script>
// import packQty from '@/mycomponents/qty/packQty.vue'
<script setup lang="ts">
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
// packQty,
packUnit,
uom,
status
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
},
data() {
return {
};
dataContent: {
type: Object,
default: {}
},
//
props: {
type: {
type: String,
default: 'default' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
recommendQty: {
type: Number,
default: 0
},
handleQty: {
type: Number,
default: 0
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
objTextStyle:{
type: Object,
default: null
}
recommendQty: {
type: Number,
default: 0
},
watch: {
handleQty: {
type: Number,
default: 0
},
methods: {
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
}
objTextStyle:{
type: Object,
default: null
}
})
</script>
<style lang="scss">

412
src/mycomponents/qty/recommendQtyEdit.vue

@ -1,236 +1,202 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>包装个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box>
{{getPackUnitName(dataContent.packUnit)}}
</view>
<view class="">
<u-popup v-model="show" mode="bottom">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding: 10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx">
{{ title }}
</view>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white; height: 60%">
<view class="uni-flex uni-column">
<view class="uni-flex uni-row space-between padding title">
<text>包装个数 : </text>
<view class="uni-flex uni-row u-col-center">
<!-- <uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box> -->
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box>
{{ handleGetPackUnitName(dataContent.packUnit) }}
</view>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>包装规格 : </text>
<view class="uni-flex u-col-center uni-row">
<packUnit :dataContent="dataContent"></packUnit>
</view>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>包装规格 : </text>
<view class="uni-flex u-col-center uni-row">
<packUnit :dataContent="dataContent"></packUnit>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>总数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="false" type="number"
@input="checkNum" @confirm="confirm()" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>总数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<input class="qty_input" v-model="allQty" :focus="false" type="number" @input="checkNum" @confirm="confirm()" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class="split_line"></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</u-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
uom,
stdUom,
packUnit
},
data() {
return {
allQty: 0,
stdCount: 0,
labelQty: 0,
recommendQty: 0,
maxlength: 10
}
},
watch: {
// handleQty: {
// handler(newval, oldval) {
// this.allQty = Number(this.handleQty)
// },
// immediate: true,
// deep: true
// }
},
created() {
},
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import { getUomInfo, getPackUnitName } from '@/common/directory.js'
import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
props: {
title: {
type: String,
default: "编辑数量"
},
dataContent: {
type: Object,
default: null
},
handleQty: {
type: Number,
default: 0
},
settingParam: {
type: Object,
default: null
},
},
methods: {
getPackUnitName(packUnit) {
let unit = getPackUnitName(packUnit);
return unit;
},
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
const props = defineProps({
title: {
type: String,
default: '编辑数量'
},
dataContent: {
type: Object,
default: null
},
handleQty: {
type: Number,
default: 0
},
settingParam: {
type: Object,
default: null
}
})
const allQty = ref(0)
const stdCount = ref(0)
const labelQty = ref(0)
const recommendQty = ref(0)
const maxlength = ref(0)
const show = ref(false)
const comMessageRef = ref()
const dataContent = ref(props.dataContent)
const handleGetPackUnitName = (packUnit) => {
const unit = getPackUnitName(packUnit)
return unit
}
const checkNum = (e) => {
const { value } = e.detail
const dot = value.indexOf('.') //
const reg = /^[0-9]+$/ //
if (dot > -1) {
maxlength.value = dot + 7 //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) {
//
maxlength.value = 10
}
}
const openEditPopup = () => {
setTimeout((res) => {
show.value = true
}, 500)
}
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
},
openEditPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
openTaskEditPopup(recommendQty, handleQty, labelQty) {
this.recommendQty = Number(recommendQty);
this.labelQty = Number(labelQty);
this.allQty = Number(handleQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
openRecordEditPopup(labelQty) {
this.recommendQty = 0;
this.labelQty = Number(labelQty);
this.allQty = Number(labelQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.closeEditPopup();
},
calcQty(val) {
if (val > 0) {
this.allQty = val * this.dataContent.packQty;
}
},
setValue() {
// var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty);
if (this.allQty > this.labelQty) {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' +
this.labelQty +
']',
res => {
this.allQty = this.labelQty;
})
} else {
if (this.recommendQty != 0) {
if (this.allQty > this.recommendQty) {
if (this.settingParam.allowBiggerQty != null && this.settingParam.allowBiggerQty ==
"TRUE") {
this.callback();
} else {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于推荐数量[' +
this.recommendQty +
']',
res => {
this.allQty = this.labelQty;
})
}
} else if (this.allQty < this.recommendQty) {
if (this.settingParam.allowSmallerQty != null && this.settingParam.allowSmallerQty ==
"TRUE") {
this.callback();
} else {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许小于推荐数量[' +
this.recommendQty +
']',
res => {
this.allQty = this.labelQty;
})
}
} else {
this.callback();
}
} else {
this.callback();
}
}
},
callback() {
this.$emit("confirm", Number(this.allQty));
this.closeEditPopup();
}
}
}
const openTaskEditPopup = (recommendQtyParams, handleQty, labelQtyParams) => {
// dataContent.value =
recommendQty.value = Number(recommendQtyParams)
labelQty.value = Number(labelQtyParams)
allQty.value = Number(handleQty)
setTimeout((res) => {
show.value = true
}, 500)
}
const openRecordEditPopup = (labelQtyParams, item) => {
dataContent.value = item
recommendQty.value = 0
labelQty.value = Number(labelQtyParams)
allQty.value = Number(labelQtyParams)
setTimeout((res) => {
show.value = true
}, 500)
}
const closeEditPopup = () => {
show.value = false
}
const confirm = () => {
setValue()
}
const cancel = () => {
closeEditPopup()
}
const calcQty = (e) => {
if (e.value > 0) {
allQty.value = e.value * dataContent.value.packQty
}
}
const setValue = () => {
// var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty);
if (allQty.value > labelQty.value) {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于标签数量[${labelQty.value}]`, (res) => {
allQty.value = labelQty.value
})
} else if (recommendQty.value != 0) {
if (allQty.value > recommendQty.value) {
if (props.settingParam.allowBiggerQty != null && props.settingParam.allowBiggerQty == 'TRUE') {
callback()
} else {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于推荐数量[${recommendQty.value}]`, (res) => {
allQty.value = labelQty.value
})
}
} else if (allQty.value < recommendQty.value) {
if (props.settingParam.allowSmallerQty != null && props.settingParam.allowSmallerQty == 'TRUE') {
callback()
} else {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许小于推荐数量[${recommendQty.value}]`, (res) => {
allQty.value = labelQty.value
})
}
} else {
callback()
}
} else {
callback()
}
}
const callback = () => {
emit('confirm', Number(allQty.value))
closeEditPopup()
}
//
const emit = defineEmits(['confirm'])
defineExpose({ openTaskEditPopup, openRecordEditPopup })
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
.title {
font-size: 30rpx;
}
</style>

36
src/mycomponents/qty/stdUom.vue

@ -5,32 +5,22 @@
</template>
<script>
<script setup lang="ts">
import {
getPackUnitInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
uom: {
type: String,
default: ''
},
},
methods: {
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
const props = defineProps({
uom: {
type: String,
default: ''
}
})
const getPackUnit = (uom) => {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
</script>

36
src/mycomponents/qty/uom.vue

@ -1,36 +1,26 @@
<template>
<view class="uom">
{{getUomInfo(uom)}}
{{getUom(uom)}}
</view>
</template>
<script>
<script setup lang="ts">
import {
getUomInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
uom: {
type: String,
default: ''
},
const props = defineProps({
uom: {
type: String,
default: ''
},
methods: {
getUomInfo(uom) {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
})
const getUom = (uom) => {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
</script>

238
src/mycomponents/recommend/recommend.vue

@ -1,157 +1,103 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;">
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
<view :class="detail.scaned ? 'scan_view' : ''" class="u-p-t-1 u-p-b-20">
<view class="uni-flex uni-row space-between u-p-t-20" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
</container> -->
<pack v-if="isShowPack && detail.packingNumber!=null" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</to-location>
</view>
<view style="word-break: break-all;" class="uni-flex uni-row center">
<!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<pack v-if="isShowPack && detail.packingNumber != null" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch && detail.batch != null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </to-location>
</view>
<view style="word-break: break-all" class="uni-flex uni-row center">
<!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty == null || detail.handleQty == undefined" :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; width: 20px; " @click="copy">复制</text>
<!-- <text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> -->
</view>
</view>
</view>
</view>
<view v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view>
</view>
</view>
</view>
</template>
<script>
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
<script setup lang="ts">
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
},
const props = defineProps({
detail: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
data() {
return {
locationTitle: {
type: String,
default: '库位'
}
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
locationTitle: {
type: String,
default: '库位'
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
}
const isDevlement = () => {
return config.isDevelopment
}
</script>
<style>
</style>
<style></style>

221
src/mycomponents/recommend/recommendCount.vue

@ -1,146 +1,95 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between ">
<!-- uni-inline-item 暂时拿掉-->
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</location>
</view>
<view class="uni-flex uni-row center">
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff">
<view class="uni-flex uni-row space-between">
<!-- uni-inline-item 暂时拿掉-->
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location>
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </location>
</view>
<view class="uni-flex uni-row center">
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty> -->
<!-- {{detail.scaned}} -->
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)"
:isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned==true"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>
</view>
</view>
</view>
<!-- {{detail.scaned}} -->
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" :isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned == true" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty>
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<text style="font-size: 24rpx; color: #2979ff" @click="copy">复制采购</text>
<text style="font-size: 24rpx; color: #2979ff" @click="copyPro">|制品</text>
</view>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
const props = defineProps({
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
data() {
return {
locationTitle: {
type: String,
default: '库位'
},
isShowRecommendQty: {
type: Boolean,
default: true
}
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
locationTitle: {
type: String,
default: '库位'
},
isShowRecommendQty: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
}
const isDevlement = () => {
return config.isDevelopment
}
</script>
<style>
</style>
<style></style>

150
src/mycomponents/record/record.vue

@ -1,96 +1,68 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<view class="uni-flex uni-row space-between uni-inline-item">
<view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view>
<view>
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty>
<view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between uni-inline-item">
<view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view>
<view>
<qty v-if="dataContent.record == null || dataContent.record == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
</compare-qty>
</view>
</view>
<view class='split_line'></view>
</view>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" :handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </compare-qty>
</view>
</view>
<view class="split_line"></view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue'
export default {
components: {
pack,
location,
batch,
qty,
recommendQty,
compareQty,
bussinessType,
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowBusiness: {
type: Boolean,
default: false
},
scaned: {
type: Boolean,
default: true
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
},
watch: {
},
methods: {
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue'
}
}
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowBusiness: {
type: Boolean,
default: false
},
scaned: {
type: Boolean,
default: true
},
fromInventoryStatus: {
type: String,
default: ''
},
toInventoryStatus: {
type: String,
default: ''
}
})
</script>
<style>
</style>
<style></style>

301
src/mycomponents/record/recordComDetailCard.vue

@ -1,179 +1,150 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<!-- <view class='split_line'></view> -->
<view class="" v-for="(detail,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation">
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class='split_line'></view> -->
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<!-- <balance-detail-popup ref="balanceDetailPopup"></balance-detail-popup> -->
<comMessage ref="comMessage"></comMessage>
</view>
<view class="" style="background-color: #fff">
<u-collapse ref="collapse1">
<u-collapse-item :open="true">
<template v-slot:title>
<u-swipe-action :show="false" style="width: 90%" :options="removeOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => removeItem(event, dataContent)">
<item-qty :dataContent="dataContent" :isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</u-swipe-action>
</template>
<u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm"></balance-qty-edit>
<record-detail-popup ref="recordDetailPopupRef"></record-detail-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'
import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
<script setup lang="ts">
import { ref, onMounted, nextTick, watch } from 'vue'
import itemQty from '@/mycomponents/item/itemQty.vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
balance,
balanceQtyEdit,
balanceDetailPopup,
purchaseLabel,
location,
recordDetailPopup
// winListHint
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
import { getDetailOption, getDetailEditRemoveOption, getClearOption } from '@/common/array.js'
isShowStatus: {
type: Boolean,
default: false
},
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: false
},
isShowToLocation: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowBalanceQty: {
type: Boolean,
default: false
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
isShowToLocation: {
type: Boolean,
default: true
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
isShowBalanceQty: {
type: Boolean,
default: false
}
})
const collapse1 = ref()
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse1.value != undefined && collapse1.value != null) {
nextTick((res) => {
collapse1.value.init()
})
}
}
},
{ immediate: true, deep: true }
)
const option = ref([])
const title = ref('推荐详情')
const showItem = ref({})
const editItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const removeOptions = ref([])
const dataList = ref([])
const comMessageRef = ref('')
const balanceQtyEditRef = ref('')
const recordDetailPopupRef = ref('')
const dataContent = ref(props.dataContent)
dataContent.value.subList.forEach((item) => {
item.show = false
})
onMounted(() => {
detailOptions.value = getDetailOption()
scanOptions.value = getDetailEditRemoveOption()
removeOptions.value = getClearOption()
})
const removeItem = (params, dataContent) => {
const { text } = removeOptions.value[params[1]]
if (text == '清空') {
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息?', (res) => {
if (res) {
emit('removeItem')
}
})
}
}
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
}
if (text == '详情') {
detail(item)
} else if (text == '编辑') {
edit(item)
} else if (text == '移除') {
remove(item, params[0])
}
}
const edit = (item) => {
editItem.value = item
balanceQtyEditRef.value.openEditPopup(editItem.value, editItem.value.handleQty)
}
const detail = (item) => {
showItem.value = item
recordDetailPopupRef.value.openPopup(item)
}
const remove = (item, index) => {
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息', (res) => {
if (res) {
dataContent.value.subList.splice(index, 1)
emit('removePack')
}
})
}
const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getClearOption();
},
methods: {
removeItem(e, dataContent) {
if (e.content.text == "清空") {
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?",
res => {
if (res) {
this.$emit('removeItem')
// this.$emit('removeItem', this.dataContent)
}
});
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.handleQty);
},
detail(item) {
this.showItem = item;
this.$refs.recordDetailPopup.openPopup(item);
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});
},
confirm(qty) {
// this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
//
const emit = defineEmits(['updateData', 'removePack'])
</script>
<style>
::v-deep .u-arrow-down-icon {
margin-right: 0px !important;
}
</style>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save