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://localhost:12080/admin-api VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # 是否是测试环境
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=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_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_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:mp-weixin": "uni build -p mp-weixin",
"test:app": "uni build -p app", "test:app": "uni build -p app",
"test:custom": "uni build -p", "test:custom": "uni build -p",
"prod": "uni build --mode production",
"prod:mp-weixin": "uni build -p mp-weixin --mode production", "prod:mp-weixin": "uni build -p mp-weixin --mode production",
"prod:app": "uni build -p app --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": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001", "@dcloudio/uni-app": "3.0.0-alpha-3060920221114001",

78
src/api/http.ts

@ -20,7 +20,16 @@ const instance = axios.create({
resolve(res) resolve(res)
}, },
fail: (error : any) => { 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) => { instance.interceptors.request.use((config) => {
const { method, params, url } = config const { method, params, url } = config
// 附带鉴权的token // 附带鉴权的token
const tenantId = 1 // const tenantId = 1
var tenantId = uni.getStorageSync('tenantId')
const headers : any = { const headers : any = {
token: getAccessToken(), token: getAccessToken(),
"tenant-id":tenantId, "tenant-id": tenantId,
'Authorization': 'Bearer ' + getAccessToken() 'Authorization': 'Bearer ' + getAccessToken()
} }
if (uni.getStorageSync('openId')) { if (uni.getStorageSync('openId')) {
@ -66,45 +76,37 @@ instance.interceptors.request.use((config) => {
* *
*/ */
instance.interceptors.response.use((v) => { instance.interceptors.response.use((v) => {
const code = v.data?.code || 200 if (v) {
if (code === 401) { if (v.statusCode == 200) {
// alert('即将跳转登录页。。。', '登录过期') if (v.data.code == 0) {
// setTimeout(redirectHome, 1500) // return v.data
removeToken() return Promise.resolve(v.data)
uni.showModal({ }else if(v.data.code == 404){
title: '系统提示', uni.showModal({
content: '登录状态已过期,您可以继续留在该页面,或者重新登录', title: '系统提示',
cancelText: '关闭', content: '登录状态已过期,您可以继续留在该页面,或者重新登录',
confirmText: '重新登录', cancelText: '关闭',
success: function (res) { confirmText: '重新登录',
if (res.confirm) { success: function (res) {
uni.reLaunch({ url: '/pages/login' }) 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 } else {
if ((v.status || v.statusCode) === 200) { return Promise.reject("系统异常:" + v.data.msg)
return v.data }
}else{
} else {
return Promise.reject("系统异常:" + v.data.msg)
} }
return Promise.reject(v)
},error=>{ }, error => {
console.log(error) console.log(error)
uni.showToast({ uni.showToast({
title: '网络错误', title: '网络错误',

60
src/api/request2.js

@ -16,6 +16,7 @@ export function login(username, password, code, uuid) {
password, password,
code, code,
uuid, uuid,
tenantName
} }
return http.post('/system/auth/login', data) return http.post('/system/auth/login', data)
} }
@ -285,7 +286,7 @@ export function getMesPackInfo(code) {
* *
*/ */
export function getBasicLocationByCode(code) { export function getBasicLocationByCode(code) {
var parmas = { var params = {
code: code, code: code,
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 100
@ -730,7 +731,7 @@ export function cancleTakePutawayJob(id) {
* @param {*} params * @param {*} params
*/ */
export function putawayJobSubmit(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) { export function productDismantleRecordSubmit(params) {
return http.put("/wms/purchasereceipt-job-main/abandon",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 任务状态 * status 任务状态
@ -2118,11 +2127,13 @@ export function productionReturnRecordSubmit(params) {
* @param {*} * @param {*}
*/ */
export function getUnPlannedIssueRequestList(params) { export function getUnPlannedIssueRequestList(params) {
return request({ // return request({
url: baseApi + "/wms/unplannedissue-request-detail/senior", // url: baseApi + "/wms/unplannedissue-request-detail/senior",
method: "post", // method: "post",
data: params, // data: params,
}); // });
return http.post("/wms/unplannedissue-request-detail/senior",params)
} }
/** /**
@ -2379,7 +2390,7 @@ export function mergePackageRecordSubmit(params) {
*/ */
export function overPackageRecordSubmit(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) 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 {*} * @param {*}
@ -2528,6 +2554,20 @@ export function getOverPageJobDetail(id) {
* 翻包任务 提交 * 翻包任务 提交
* @param {*} params * @param {*} params
*/ */
export function overPageSubmit(params) { export function overPageSubmit(data) {
return http.put("/wms/packageover-job-main/execute") 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 => { getPrecisionStrategy(itemList).then(res => {
console.log(111,res.data)
if (res.data == null) { if (res.data == null) {
result.success = false result.success = false
result.message = '未查询到管理精度信息' result.message = '未查询到管理精度信息'
} else { } else {
result.list = res.data; result.list = res.data;
} }
console.log('haha',result)
callback(result); callback(result);
}).catch(error => { }).catch(error => {
result.success = false; result.success = false;
result.message = error; result.message = error;
console.log('hehe',result)
callback(result); callback(result);
}) })
} }
@ -133,17 +136,21 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
} }
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) { export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) {
let result = { let result = {
list: [], list: [],
success: true, success: true,
message: '' message: ''
}; };
let params = { let params = {
itemCodes: [label.itemCode], itemCodes: [label.itemCode],
locationCode: locationCode locationCode: locationCode
}; };
// let jsonParem = JSON.stringify(param) // let jsonParem = JSON.stringify(param)
getManagementPrecision(params).then(res => { getManagementPrecision(params).then(res => {
console.log("成功"+res)
let managementPrecision = res.data[0].ManagementPrecision; let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) { switch (managementPrecision) {
case 'BY_PACKAGING': case 'BY_PACKAGING':
@ -172,6 +179,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento
break; break;
} }
}).catch(error => { }).catch(error => {
console.log("失败"+error)
let result = { let result = {
success: false, success: false,
message: error message: error

2
src/common/calc.js

@ -1,5 +1,5 @@
/* 解决js计算精度问题 */ /* 解决js计算精度问题 */
import { Decimal } from 'decimal.js';//引入 import Decimal from 'decimal.js'
class Calc { class Calc {
add(num1,num2) { add(num1,num2) {
return new Decimal(num1).add(new Decimal(num2)).toNumber() 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 => items.forEach(r =>
r.subList.forEach(s => { r.subList.forEach(s => {
s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber) s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber)
s.packList.forEach(pac=>{ s.packList.forEach(pac => {
pac.scaned=false; pac.scaned = false;
}) })
}) })
) )
@ -45,23 +45,23 @@ export function getTreeDataSource(dataList) {
} }
export function getDataSource(subList) { export function getDataSource(subList) {
let items = []; let items = [];
subList.forEach(detail => { subList.forEach(detail => {
var item = items.find(r => var item = items.find(r =>
r.itemCode == detail.itemCode) r.itemCode == detail.itemCode)
if (item == undefined) { if (item == undefined) {
item = createItemInfo(detail); item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail); item.subList.push(newDetail);
items.push(item) items.push(item)
} else { } else {
item.qty = calc.add(item.qty, detail.qty) item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail); item.subList.push(newDetail);
} }
}) })
return items; return items;
} }
export function createItemInfo(detail) { export function createItemInfo(detail) {
let item = { let item = {
@ -104,8 +104,10 @@ export function calcHandleQty(detailSource) {
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined) {
item.handleQty = calc.add(item.handleQty, detail.handleQty); if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
item.qty = calc.add(item.qty, detail.qty); item.qty = calc.add(item.qty, detail.qty);
} }
} }
@ -118,10 +120,10 @@ export function calcTreeHandleQty(detailSource) {
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
if(detail.packList.length>0){ if (detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber(); detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList){ for (let pack of detail.packList) {
if(pack!=undefined&&pack.scaned){ if (pack != undefined && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty); detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
} }
} }

2
src/common/directory.js

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

5
src/common/record.js

@ -36,6 +36,8 @@ export function createDetailInfo(balance, pack) {
detail.packUnit = pack.packUnit detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ; detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack; detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail; return detail;
} }
@ -43,10 +45,13 @@ export function createDetailInfo(balance, pack) {
//计算实际数量 //计算实际数量
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
console.log('qqqqqqqqq')
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber();
console.log('bbbbbb')
for (let detail of item.subList) { for (let detail of item.subList) {
if(detail!=undefined){ if(detail!=undefined){
console.log(detail)
if(detail.scaned){ if(detail.scaned){
item.handleQty = calc.add(item.handleQty,detail.handleQty); 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; text-align: center;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
opacity: 0.8; opacity: 0.8;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
} }
.scan_float image { .scan_float image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-top: 10rpx;
} }
.scan_float view { .scan_float view {
color: #fff; color: #fff;
font-size: .725rem; font-size: .725rem;
margin-top: -8rpx;
} }
.top_card { .top_card {
@ -218,7 +220,9 @@ uni-page-head .uni-page-head__title {
padding: 0 0rpx; padding: 0 0rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
float: left; background:#EEF4FA;
padding:20rpx;
border-radius: 10rpx;
} }
.cell_box { .cell_box {
@ -231,6 +235,7 @@ uni-page-head .uni-page-head__title {
padding: 0 20rpx; padding: 0 20rpx;
/* margin: 0 0 20rpx; */ /* margin: 0 0 20rpx; */
text-align: center; text-align: center;
flex:1
} }
.cell_box .cell_long { .cell_box .cell_long {
@ -240,7 +245,8 @@ uni-page-head .uni-page-head__title {
.cell_box .cell_info view { .cell_box .cell_info view {
font-size: 0.9375rem; font-size: 0.9375rem;
margin-bottom: 10rpx; margin-bottom: 10rpx;
color: #7B8195; color: #515562;
word-wrap:break-word
} }
.cell_box .cell_info .text_black { .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 { .cen_card .cell_box .cell_info .text_lightblue {
font-size: 0.925rem; font-size:26rpx;
} }
.bot_card { .bot_card {
@ -1394,13 +1400,13 @@ uni-page-head .uni-page-head__title {
} }
.msg_list { .msg_list {
padding-top: 20rpx;
} }
.msg_list .uni-list-chat__header { .msg_list ::v-deep .u-card__head--left__thumb{
width: 60rpx !important; width: 60rpx !important;
height: 60rpx !important; height: 60rpx !important;
background-color: #3d7eff; padding:12rpx;
background-color: #3d7eff!important;
border-color: transparent !important; border-color: transparent !important;
border-radius: 6rpx !important; border-radius: 6rpx !important;
} }
@ -1426,9 +1432,8 @@ uni-page-head .uni-page-head__title {
.msg_list .uni-list-chat__content-title { .msg_list .uni-list-chat__content-title {
font-size: .9rem !important; font-size: .9rem !important;
} }
::v-deep .msg_list .hasread .u-card__head--left__thumb {
.msg_list .hasread .uni-list-chat__header { background-color: #ccc!important;
background-color: #ccc;
} }
/* index */ /* index */
@ -2031,9 +2036,8 @@ button::after {
} }
.card_itemCode { .card_itemCode {
font-size: 38rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
font-weight: 500;
/* padding: 5rpx 10rpx; */ /* padding: 5rpx 10rpx; */
/* width: 210rpx; */ /* width: 210rpx; */
word-wrap: break-word; word-wrap: break-word;
@ -2042,7 +2046,7 @@ button::after {
.card_itemName { .card_itemName {
color: #909399; color: #909399;
font-size: 30rpx; font-size: 26rpx;
/* padding: 5rpx 10rpx; */ /* padding: 5rpx 10rpx; */
/* width: 210rpx; */ /* width: 210rpx; */
word-wrap: break-word; word-wrap: break-word;
@ -2070,23 +2074,27 @@ button::after {
.card_content { .card_content {
font-size: 32rpx; font-size: 32rpx;
padding: 5px; color:#2E3A63;
margin-left:20rpx
} }
.card_icon_normal { .card_icon_normal {
width: 45rpx; width: 30rpx;
height: 45rpx; height: 30rpx;
vertical-align: middle vertical-align: middle;
margin-right:12rpx
} }
.card_packing_code { .card_packing_code {
color: #3315EB; color: #1677FF;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_batch { .card_batch {
color: #9747FF; color: #9747FF;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_container { .card_container {
@ -2101,23 +2109,23 @@ button::after {
} }
.card_business { .card_business {
color: #F1A532; color: #F1A532; font-size: 26rpx; font-style: italic;
padding: 5px;
} }
.card_business_content { .card_business_content {
font-size: 32rpx; font-size: 32rpx; color:#2E3A63; margin-left:20rpx
padding: 5px;
} }
.card_location { .card_location {
color: #DA8910; color: #DA8910;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_to_location { .card_to_location {
color: #329362; color: #329362;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_location_content { .card_location_content {
@ -2151,12 +2159,14 @@ button::after {
.scan_view { .scan_view {
/* #0CC2B6 20% */ /* #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 { .card_view {
font-size: 32rpx; font-size: 32rpx;
padding: 5rpx; margin-top:14rpx
} }
/* /*
@ -2199,30 +2209,28 @@ button::after {
.task_top { .task_top {
margin: 0rpx 10rpx; margin: 0rpx 10rpx;
background-color: #fff; background-color: #fff;
vertical-align: middle;
} }
.task_item { .task_item {
margin: 0rpx 10rpx;
margin-top: 10rpx;
background-color: #fff; background-color: #fff;
padding:20rpx 0px
} }
.task_card { .task_card {
padding: 12rpx; padding:0px 20rpx;
background-color: #fff; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
margin: 12rpx;
} }
.task_number { .task_number {
font-size: 35rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
/* bold */ /* bold */
} }
.task_text { .task_text {
font-size: 30rpx; font-size: 30rpx;
margin: 5rpx 0rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -2281,21 +2289,22 @@ button::after {
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
border-radius: 8rpx 8rpx 0rpx 0rpx; border-radius: 8rpx 8rpx 0rpx 0rpx;
padding: 15rpx; padding:0px 30rpx;
} }
.pop_detail .item { .pop_detail .item {
padding-top: 5rpx; padding-top: 5rpx;
padding-bottom: 5rpx; padding-bottom: 5rpx;
margin-left: 10rpx; /* margin-left: 10rpx; */
margin-right: 10rpx; /* margin-right: 10rpx; */
display: flex; display: flex;
flex-direction: row; flex-direction: row;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
align-items:center
} }
.pop_detail .item_title { .pop_detail .item_title {
@ -2460,7 +2469,7 @@ button[disabled] {
.center { .center {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
} }
@ -2473,6 +2482,7 @@ button[disabled] {
.text_recommend { .text_recommend {
color: #0A84FF; color: #0A84FF;
font-size: 38rpx; font-size: 38rpx;
font-weight:bold
} }
.text_balance { .text_balance {
@ -2506,7 +2516,7 @@ button[disabled] {
align-items: center; align-items: center;
padding: 0px; padding: 0px;
color: #909399; color: #909399;
font-size: 30rpx; font-size:26rpx;
} }
.std_uom { .std_uom {
@ -2518,7 +2528,7 @@ button[disabled] {
.uom { .uom {
color: #909399; color: #909399;
font-size: 30rpx; font-size: 26rpx;
margin-left: 5rpx; margin-left: 5rpx;
margin-right: 5rpx; margin-right: 5rpx;
display: flex; display: flex;
@ -2667,8 +2677,9 @@ button[disabled] {
align-self: stretch; align-self: stretch;
/* 颜色/白色 */ /* 颜色/白色 */
background: #FFFFFF; background:rgba(60, 156, 255, 1);
box-sizing: border-box; box-sizing: border-box;
color:white;
/* 颜色/边框 */ /* 颜色/边框 */
border: 1px solid #E7E6E4; border: 1px solid #E7E6E4;
z-index: 3; z-index: 3;
@ -2774,7 +2785,6 @@ button[disabled] {
} }
.split_line { .split_line {
background-color: #e0e0e0; background-color: rgba(230,230,230,0.5);
height: 1px; height: 1px;
margin: 10rpx;
} }

48
src/common/style/pdabasic.css

@ -253,7 +253,6 @@
font-size: 28rpx; font-size: 28rpx;
background: rgba(95, 203, 148, 0.2); background: rgba(95, 203, 148, 0.2);
color: #22AF68; color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
@ -282,8 +281,9 @@
/* 关闭 */ /* 关闭 */
.other { .other {
background-color: #808080; /* background-color: #808080; */
color: #FFFFFF; color: #b4a5ff;
font-size: 26rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
@ -329,16 +329,19 @@
.inventory_status_insp { .inventory_status_insp {
color: #F9AE3D; color: #F9AE3D;
margin-right: 10rpx; margin-right: 10rpx;
font-size:26rpx
} }
.inventory_status_ok { .inventory_status_ok {
color: #67C23A; color: #67C23A;
margin-right: 10rpx; margin-right: 10rpx;
font-size:26rpx
} }
.inventory_status_nok { .inventory_status_nok {
color: #FF2424; color: #FF2424;
margin-right: 10rpx; margin-right: 10rpx;
font-size:26rpx
} }
.inventory_status_hold { .inventory_status_hold {
@ -480,10 +483,9 @@ export function getItemTypeStyle(val) {
.detail-list { .detail-list {
background-color: #fff; background-color: #fff;
padding:5rpx 10rpx; margin:20rpx 20rpx;
/* margin: 20rpx; */ padding:0px 20rpx;
/* border-radius: 16rpx; */ border-radius: 16rpx;
/* overflow: hidden; */
} }
.detail-content { .detail-content {
@ -721,19 +723,27 @@ page {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
/* background-color: #fff; */ background-color: #f5f5f5;
} }
.page-header { .page-header {
background-color: #fff; background-color: rgb(60, 156, 255) !important;
font-size: 35rpx; 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 { .page-header .header_item {
/* padding-left: 10rpx; */ /* padding-left: 10rpx; */
padding: 5rpx 10rpx; font-size:28rpx ;
font-size:32rpx ; color:#777E94;
}
.page-header .header_item text{
color:#011C43;
} }
.page-header .header_job_top { .page-header .header_job_top {
@ -742,7 +752,6 @@ page {
.page-main { .page-main {
flex: 1; flex: 1;
position: relative; position: relative;
background: #fff;
} }
.page-main-scroll { .page-main-scroll {
@ -760,3 +769,16 @@ page {
background: #e0e0e0; 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封装个性化分页组件演示可减少大量重复代码 --> <!-- 基于z-paging封装个性化分页组件演示可减少大量重复代码 -->
<template> <template>
<!-- 这边统一设置z-paging在页面中使用时就不用重复写 --> <!-- 这边统一设置z-paging在页面中使用时就不用重复写 -->
<!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> <!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query -->
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 --> <!-- 极简写法在下方设置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" <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': '繁体的加载中' }">
:useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" <!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 -->
:loading-more-loading-text="{'en':'英文的加载中','zh-cn':'中文的加载中','zh-hant-cn':'繁体的加载中'}"> <template #top>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" -->
<slot name="top" />
</template>
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 --> <!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为bottom固定在顶部 -->
<template #top> <!-- vue3中用v-slot:bottom -->
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" --> <template #bottom>
<slot name="top" /> <!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="bottom" -->
</template> <slot name="bottom" />
</template>
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为bottom固定在顶部 --> <template #empty v-if="$slots.empty">
<!-- vue3中用v-slot:bottom --> <!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="empty" -->
<template #bottom> <slot name="empty" />
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="bottom" --> </template>
<slot name="bottom" />
</template>
<template #empty v-if="$slots.empty" > <!-- 这个是插入虚拟列表/内置列表的cell -->
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="empty" --> <template #cell="{ item, index }">
<slot name="empty" /> <slot name="cell" :item="item" :index="index" />
</template> </template>
<!-- 这个是插入虚拟列表/内置列表的cell --> <!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view页面那边就不用再写下面两行了 -->
<template #cell="{item,index}"> <!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) -->
<slot name="cell" :item="item" :index="index"/> <template #refresher="{ refresherStatus }">
</template> <!-- <custom-refresher :status="refresherStatus" /> -->
</template>
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> -->
<u-loadmore status="normore" />
</template>
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view页面那边就不用再写下面两行了 --> <!-- 这里接收页面传进来的普通slot如列表数据等 -->
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) --> <slot />
<template #refresher="{refresherStatus}"> </z-paging>
<!-- <custom-refresher :status="refresherStatus" /> -->
</template>
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> -->
<uni-load-more status="normore" />
</template>
<!-- 这里接收页面传进来的普通slot如列表数据等 -->
<slot />
</z-paging>
</template> </template>
<script> <script setup lang="ts">
export default { import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
name: "my-paging", import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
data() {
return { const props = defineProps({
list: [] value: {
}; type: Array,
}, default() {
props: { return []
//v-modellist }
value: { },
type: Array, // 使
default: function() { useVirtualList: {
return []; type: Boolean,
} default: false
}, },
//使 // z-paging()use-virtual-listtruetrue
useVirtualList: { useInnerList: {
type: Boolean, type: Boolean,
default: false default: false
}, },
//z-paging()use-virtual-listtruetrue // cellkeynvuenvueuse-inner-list
useInnerList: { cellKeyName: {
type: Boolean, type: String,
default: false default: ''
}, },
//cellkeynvuenvueuse-inner-list // innerList
cellKeyName: { innerListStyle: {
type: String, type: Object,
default: '' default() {
}, return {}
//innerList }
innerListStyle: { },
type: Object, // ()127celldom()
default: function() { preloadPage: {
return {}; type: [Number, String],
} default: 12
}, },
//()127celldom() // cellfixedcellcelldynamicdynamicfixed
preloadPage: { cellHeightMode: {
type: [Number, String], type: String,
default: 12 default: 'fixed'
}, },
//cellfixedcellcelldynamicdynamicfixed // scroll60
cellHeightMode: { virtualScrollFps: {
type: String, type: [Number, String],
default: 'fixed' default: 60
}, }
//scroll60 })
virtualScrollFps: { const list = ref([])
type: [Number, String], const paging = ref()
default: 60 // v-modez-paging
}, watch(
}, () => props.value,
watch: { (newVal) => {
//v-modez-paging list.value = newVal
value(newVal) { }
this.list = newVal; )
}, // #ifdef VUE3
// #ifdef VUE3 watch(
modelValue(newVal) { () => props.modelValue,
this.list = newVal; (newVal) => {
}, list.value = newVal
// #endif }
//z-paging )
list(newVal) { // #endif
//emit inputv-model watch(
this.$emit('input', newVal); () => list.value,
// #ifdef VUE3 (newVal) => {
this.$emit('update:modelValue', newVal); // emit inputv-model
// #endif emit('input', newVal)
} // #ifdef VUE3
}, emit('update:modelValue', newVal)
methods: { // #endif
//z-paging@queryemit }
queryList(pageNo, pageSize) { )
console.log("queryList",pageNo)
// this.$emit('query', pageNo, pageSize); // z-paging@queryemit
}, const queryList = (pageNo, pageSize) => {
//reloadz-paging console.log('queryList', pageNo)
reload(data) { // this.$emit('query', pageNo, pageSize);
this.$refs.paging.reload(data); }
}, // reloadz-paging
//completez-paging const reload = (data) => {
complete(data) { paging.value.reload(data)
this.$refs.paging.complete(data); }
}, // completez-paging
/* const complete = (data) => {
//使mixins使 paging.value.complete(data)
//updatePageScrollTopz-paging }
updatePageScrollTop(data){ /*
this.$refs.paging.updatePageScrollTop(data); //使mixins使
}, //updatePageScrollTopz-paging
//pageReachBottomz-paging updatePageScrollTop(data){
pageReachBottom(){ this.$refs.paging.updatePageScrollTop(data);
this.$refs.paging.pageReachBottom(); },
}, //pageReachBottomz-paging
//doChatRecordLoadMorez-paging pageReachBottom(){
doChatRecordLoadMore() { this.$refs.paging.pageReachBottom();
this.$refs.paging.doChatRecordLoadMore(); },
} //doChatRecordLoadMorez-paging
*/ doChatRecordLoadMore() {
} this.$refs.paging.doChatRecordLoadMore();
} }
*/
//
const emit = defineEmits(['input', 'update:modelValue'])
defineExpose({
reload,
complete
})
</script> </script>
<style> <style></style>
</style>

192
src/manifest.json

@ -1,82 +1,114 @@
{ {
"name" : "富维汽车镜", "name": "富维汽车镜",
"appid" : "__UNI__DA78BC9", "appid": "__UNI__DA78BC9",
"description" : "", "description": "",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : "100", "versionCode": "100",
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : {}, "modules": {},
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
/* ios */ /* ios */
"ios" : { "ios": {
"dSYMs" : false "dSYMs": false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"ad" : {} "ad": {}
} },
} "nativePlugins": {
}, "TestModule": {
/* */ "__plugin_info__": {
"quickapp" : {}, "name": "TestModule",
/* */ "description": "打印",
"mp-weixin" : { "platforms": "Android",
"appid" : "wx6176535b0b0153f0", "url": "",
"setting" : { "android_package_name": "",
"urlCheck" : false "ios_bundle_id": "",
}, "isCloud": false,
"usingComponents" : true "bought": -1,
}, "pid": "",
"mp-alipay" : { "parameters": {}
"usingComponents" : true }
}, }
"mp-baidu" : { }
"usingComponents" : true },
}, "nativePlugins": {
"mp-toutiao" : { "TestModule": {
"usingComponents" : true "__plugin_info__": {
}, "name": "TestModule",
"uniStatistics" : { "description": "打印",
"enable" : false "platforms": "Android",
}, "url": "",
"vueVersion" : "3", "android_package_name": "",
"h5" : { "ios_bundle_id": "",
"template" : "index.html", "isCloud": false,
"devServer" : { "bought": -1,
"port" : 9020 "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> <template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; "> <view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center"> <view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view> <view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> <location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> <to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
</to-location> </view>
</view> <view class="uni-flex uni-row u-align-start">
<view class="uni-flex uni-row center"> <!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> --> :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent" <qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
: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>
<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()"> <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> <image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view> </view>
</view> </view>
</view>
</view> <!-- <u-line></u-line> -->
<!-- <u-line></u-line> --> </view>
</view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue' import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue' import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import config from '@/static/config.js'
import config from '@/static/config.js'
export default {
components: {
pack,
location,
toLocation,
batch,
qty,
recommendQty,
compareQty,
},
data() { const props = defineProps({
return { 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}`
} uni.setClipboardData({
}, data: content,
props: { success: () => {
dataContent: { uni.showToast({
type: Object, title: '复制采购标签成功'
default: {} })
}, }
isShowPack: { })
type: Boolean, }
default: true const copyPro = () => {
}, // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
isShowBatch: { const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
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({
methods: { data: content,
copy() { success: () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 uni.showToast({
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + title: '复制制品标签成功'
this.dataContent.batch + ";Q" + this.dataContent.qty })
// #ifdef H5 }
this.$copyText(content).then( })
res => { }
uni.showToast({ const isDevlement = () => {
title: '复制成功', return config.isDevelopment
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;
}
}
}
</script> </script>
<style> <style></style>
</style>

51
src/mycomponents/balance/balanceSelect.vue

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

26
src/mycomponents/balance/batch.vue

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

51
src/mycomponents/balance/bussinessType.vue

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

128
src/mycomponents/balance/handleBalance.vue

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

30
src/mycomponents/balance/location.vue

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

45
src/mycomponents/balance/pack.vue

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

87
src/mycomponents/balance/productionLabel.vue

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

126
src/mycomponents/balance/recommendBalance.vue

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

28
src/mycomponents/balance/toLocation.vue

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

74
src/mycomponents/button/requestButton.vue

@ -4,53 +4,43 @@
<image src="@/static/icons_ui/icon_add.svg"></image> <image src="@/static/icons_ui/icon_add.svg"></image>
<view>{{btnName}}</view> <view>{{btnName}}</view>
</view> </view>
<!-- <movable-area>
<movable-view class="max" direction="all">扫描</movable-view>
</movable-area> -->
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { import {
data() { ref,
return { nextTick
x: 0, } from 'vue'
y: 0, const props = defineProps({
old: { btnName: {
x: 0, type: String,
y: 0 default: '创建'
}
}
},
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
}
}, },
})
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> </script>
<style> <style>

46
src/mycomponents/common/comBlankView.vue

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

27
src/mycomponents/common/comEmptyView.vue

@ -4,36 +4,11 @@
<view class=""> <view class="">
<image class="default_nodata" src="@/static/icons_ui/default_data.png"></image> <image class="default_nodata" src="@/static/icons_ui/default_data.png"></image>
</view> </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> </view>
</template> </template>
<script> <script setup lang="ts">
export default {
data() {
return {
}
},
created() {
},
methods: {
}
}
</script> </script>

122
src/mycomponents/common/comListItem.vue

@ -1,27 +1,25 @@
<template> <template>
<view class="">
<view class="uni-flex uni-column"> <view class="uni-flex uni-column">
<view class="item" v-for="(item,index) in dataList"> <view class="item" v-for="(item,index) in dataList">
<text class="item_title">{{item.title}} : </text> <text class="item_title">{{item.title}} : </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </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=='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=='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=='transferMode'" class="text_wrap">{{handleGetTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(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">{{getUomInfo(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">{{getInspectType(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">{{getSampleMethod(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">{{getRequestStateInfo(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">{{getInventoryStatusName(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">{{getLocationTypeName(item.content)}} </text> <text v-else-if="item.type=='locationCode'" class="text_wrap">{{handleGetLocationTypeName(item.content)}} </text>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script setup lang="ts">
import { import {
dateFormat dateFormat
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -38,69 +36,49 @@
getLocationTypeName getLocationTypeName
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { const props = defineProps({
components: {}, dataList: {
data() { type: Array,
return { default: []
}
},
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 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> </script>
<style> <style>

938
src/mycomponents/common/comMessage.vue

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

25
src/mycomponents/common/comPopup.vue

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

111
src/mycomponents/container/targetContainer.vue

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

296
src/mycomponents/detail/comDetailCard.vue

@ -1,163 +1,145 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff">
<uni-collapse ref="collapse1" @change=""> <u-collapse ref="collapse">
<uni-collapse-item :open="true"> <u-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" <item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty>
:isShowStdPack="false"> </template>
</item-compare-qty> <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)">
</template> <recommend :detail="item" :isShowToLocation="false"> </recommend>
</u-swipe-action>
<view class="" v-for="(item,index) in dataContent.subList" :key="index"> </u-collapse-item>
<uni-swipe-action ref="swipeAction"> </u-collapse>
<uni-swipe-action-item @click="swipeClick($event,item)" <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
:right-options="item.scaned?scanOptions:detailOptions" <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
style='padding:0px 0px 5px 0px;align-items: center;'> <com-message ref="comMessageRef" />
<recommend :detail="item" :isShowToLocation="false"> </view>
</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>
</template> </template>
<script> <script setup lang="ts">
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import { import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
getDetailOption, import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
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);
},
detail(item) { const props = defineProps({
this.$emit('openDetail', item); dataContent: {
// this.showItem = item; type: Object,
// this.$refs.jobDetailPopup.openPopup(item) default: null
}, },
remove(item) { settingParam: {
this.$refs.message.showQuestionMessage("确定移除扫描信息?", type: Object,
res => { default: null
if (res) { },
item.scaned = false isShowPack: {
item.balance = {} type: Boolean,
item.handleQty = null; default: true
this.$forceUpdate() },
this.$emit('remove', item) isShowBatch: {
} type: Boolean,
}); default: true
}, },
confirm(qty) { isShowLocation: {
this.editItem.handleQty = qty; type: Boolean,
this.$emit('updateData') default: true
}, },
showLocation(item) { locationAreaTypeList: {
this.locatonItem = item; type: Array,
this.$refs.scanLocationCode.openScanPopup(); default: null
}, }
// })
getLocation(location, code) { const option = ref([])
this.locatonItem.toLocationCode = code; const showItem = ref({})
this.$emit('updateData') 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> </script>
<style> <style></style>
</style>

276
src/mycomponents/detail/comJobDetailCard.vue

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

269
src/mycomponents/detail/comRequestDetailCard.vue

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

40
src/mycomponents/detail/detailBalanceInfo.vue

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

103
src/mycomponents/detail/detailCommonInfo.vue

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

29
src/mycomponents/detail/detailHandleInfo.vue

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

33
src/mycomponents/detail/detailItemInfo.vue

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

32
src/mycomponents/detail/detailPackageInfo.vue

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

39
src/mycomponents/detail/detailRecommendInfo.vue

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

121
src/mycomponents/detail/jobDetailPopup.vue

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

92
src/mycomponents/detail/recordDetailCommonInfo.vue

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

113
src/mycomponents/detail/recordDetailPopup.vue

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

102
src/mycomponents/detail/requestDetailCommonInfo.vue

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

62
src/mycomponents/item/item.vue

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

100
src/mycomponents/item/itemCompareQty.vue

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

85
src/mycomponents/item/itemInfo.vue

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

270
src/mycomponents/item/itemInfoPopup.vue

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

86
src/mycomponents/item/itemQty.vue

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

34
src/mycomponents/job/jobBottom.vue

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

27
src/mycomponents/job/jobComMainCard.vue

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

53
src/mycomponents/job/jobComMainCardAsn.vue

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

130
src/mycomponents/job/jobComMainDetailCard.vue

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

90
src/mycomponents/job/jobCommonInfo.vue

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

125
src/mycomponents/job/jobDetailPopup.vue

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

299
src/mycomponents/job/jobFilter.vue

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

28
src/mycomponents/job/jobNumber.vue

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

37
src/mycomponents/job/jobPersonInfo.vue

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

76
src/mycomponents/job/jobRequestInfo.vue

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

33
src/mycomponents/job/jobSettingInfo.vue

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

42
src/mycomponents/job/jobStatus.vue

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

37
src/mycomponents/job/jobTop.vue

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

58
src/mycomponents/job/jobTopAsn.vue

@ -1,42 +1,28 @@
<template> <template>
<view class="task_top"> <view class="task_item">
<view class="uni-flex space-between u-col-center align-center" > <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-if="dataContent.asnNumber == null || dataContent.asnNumber == ''" :number="dataContent.requestNumber"></job-number>
<job-number v-else :number="dataContent.asnNumber"></job-number> <job-number v-else :number="dataContent.asnNumber"></job-number>
<job-status :jobStatus="dataContent.status"></job-status> <job-status :jobStatus="dataContent.status"></job-status>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import jobNumber from '@/mycomponents/job/jobNumber.vue' import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue' import jobStatus from '@/mycomponents/job/jobStatus.vue'
export default {
components: {
jobNumber,
jobStatus
},
data() {
return {
}; const props = defineProps({
}, dataContent: {
watch: {}, type: Object,
default: {}
props: { }
dataContent: { })
type: Object, const openDetail = (item) => {
default: {} emit('openDetail', props.dataContent)
}, }
}, //
const emit = defineEmits(['openDetail'])
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
}
</script> </script>
<style lang="scss"> <style lang="scss"></style>
</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> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff">
<view class="uni-flex uni-row space-between u-col-center" > <view class="uni-flex uni-row space-between u-col-center">
<view class="location_view" > <view class="location_view">
<text class="card_location"> 库位 </text> <text class="card_location"> 库位 </text>
<text> {{locationCode}}</text> <text> {{ locationCode }}</text>
</view> </view>
<view class="" v-if="recommendQty>0"> <view class="" v-if="recommendQty > 0">
<count :countType="'recommend_handle_no_pack'" <count :countType="'recommend_handle_no_pack'" :recommendQty="recommendQty" :handledQty="handledQty" :uom="uom"></count>
:recommendQty="recommendQty" </view>
:handledQty="handledQty" </view>
:uom="uom"></count> </view>
</view>
</view>
</view>
</template> </template>
<script> <script setup lang="ts">
export default { import { ref } from 'vue'
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: ''
}
},
} 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> </script>
<style> <style></style>
</style>

196
src/mycomponents/location/locationCompare.vue

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

70
src/mycomponents/location/locationDetail.vue

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

63
src/mycomponents/location/locationInfo.vue

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

66
src/mycomponents/location/locationStatus.vue

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

118
src/mycomponents/location/requiredLocation.vue

@ -1,79 +1,53 @@
<template> <template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; <view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
padding-bottom: 15rpx; <view class="uni-flex uni-row u-col-center" @click="showLocation">
padding-left: 10rpx; <view style="font-size: 30rpx">
padding-right: 10rpx; {{ title }}
font-size:32rpx;"> <!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<view class="uni-flex uni-row u-col-center" @click="showLocation"> <text style="font-size: 25rpx; color: #3fbaff" v-if="locationCode == '' && isShowEdit == true">&nbsp 请扫描</text>
<view> <text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ locationCode }}</text>
{{title}} </view>
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> --> <image v-if="isShowEdit" style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> </view>
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text> <win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view> </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>
</template> </template>
<script> <script setup lang="ts">
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import { ref } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default { const props = defineProps({
components: { title: {
winScanLocation type: String,
}, default: '需求库位'
data() { },
return { locationCode: {
defaultlocationCode: "" type: String,
} default: ''
}, },
props: { isShowEdit: {
title: { type: Boolean,
type: String, default: true
default: "需求库位" },
}, locationAreaTypeList: {
locationCode: { type: Array,
type: String, default: null
default: "" }
}, })
isShowEdit: { const scanLocationCode = ref()
type: Boolean, const showLocation = () => {
default: true if (props.isShowEdit) {
}, scanLocationCode.value.openScanPopup()
locationAreaTypeList: { }
type: Array, }
default: null //
} const getLocation = (location, code) => {
}, emit('getLocation', location, code)
}
watch: { //
// locationCode: { const emit = defineEmits(['getLocation'])
// 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)
}
}
}
</script> </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"> <view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉--> <!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;"> <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> --> </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> <batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> <location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location> </location>
@ -14,23 +15,23 @@
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> <to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location> </to-location>
</view> </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的情况--> <!-- ||dataContent.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="dataContent.handleQty==null || dataContent.handleQty==undefined" :dataContent="dataContent" <recommend-qty v-if="dataContent.handleQty==null || dataContent.handleQty==undefined"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty> :dataContent="dataContent" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(dataContent.handleQty)" :isShowStdPack="false"> :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false">
</compare-qty> </compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> <view v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text> <image style='width: 26rpx;height: 26rpx;margin-top: 44rpx;' src="/static/icons/icon_copy.svg" alt="" @click="copy"/>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import container from '@/mycomponents/container/container.vue' import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
@ -39,117 +40,71 @@
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js' import config from '@/static/config.js'
const props = defineProps({
export default { dataContent: {
components: { type: Object,
container, default: null
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
}, },
isShowContainer: {
data() { type: Boolean,
return { default: true
}
}, },
props: { isShowPack: {
dataContent: { type: Boolean,
type: Object, default: true
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: '库位'
},
}, },
watch: { isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
}, },
methods: { isShowStatus: {
copy() { type: Boolean,
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 default: true
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent },
.batch + ";Q" + this.dataContent.qty
// #ifdef H5 locationTitle: {
this.$copyText(content).then( type: String,
res => { default: '库位'
uni.showToast({ }
title: '复制采购标签成功', })
icon: 'none' 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
// #endif
// #ifndef H5 uni.setClipboardData({
uni.setClipboardData({ data: content,
data: content, success: () => {
success: () => { uni.showToast({
uni.showToast({ title: '复制采购标签成功'
title: '复制采购标签成功'
})
}
}) })
// #endif }
}, })
copyPro() { }
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 const copyPro = () => {
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
.batch + ";Q" + this.dataContent.qty var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
// #ifdef H5 .batch + ";Q" + props.dataContent.qty
this.$copyText(content).then(
res => { uni.setClipboardData({
uni.showToast({ data: content,
title: '复制制品标签成功', success: () => {
icon: 'none' uni.showToast({
}) title: '复制制品标签成功'
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
}) })
// #endif
},
isDevlement() {
return config.isDevelopment;
} }
} })
}
const isDevlement = () => {
return config.isDevelopment;
} }
</script> </script>

417
src/mycomponents/package/packageDetailPopup.vue

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

324
src/mycomponents/package/packageList.vue

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

195
src/mycomponents/package/packageRecordCard.vue

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

278
src/mycomponents/package/packageRecordList.vue

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

86
src/mycomponents/package/packageTarget.vue

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

194
src/mycomponents/popup/selectList.vue

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

50
src/mycomponents/production/productionInfo.vue

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

68
src/mycomponents/qty/balanceQty.vue

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

395
src/mycomponents/qty/balanceQtyEdit.vue

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

101
src/mycomponents/qty/compareQty.vue

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

493
src/mycomponents/qty/countQtyEdit.vue

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

28
src/mycomponents/qty/packQty.vue

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

49
src/mycomponents/qty/packUnit.vue

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

94
src/mycomponents/qty/qty.vue

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

82
src/mycomponents/qty/recommendQty.vue

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

412
src/mycomponents/qty/recommendQtyEdit.vue

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

36
src/mycomponents/qty/stdUom.vue

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

36
src/mycomponents/qty/uom.vue

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

238
src/mycomponents/recommend/recommend.vue

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

221
src/mycomponents/recommend/recommendCount.vue

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

150
src/mycomponents/record/record.vue

@ -1,96 +1,68 @@
<template> <template>
<view :class="dataContent.scaned?'scan_view':''"> <view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between uni-inline-item"> <view class="uni-flex uni-row space-between uni-inline-item">
<view> <view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location> <location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view> </view>
<view> <view>
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" <qty v-if="dataContent.record == null || dataContent.record == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack"></qty>
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" <compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" :handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </compare-qty>
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </view>
</compare-qty> </view>
<view class="split_line"></view>
</view> </view>
</view>
<view class='split_line'></view>
</view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue' import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.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: {
} 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> </script>
<style> <style></style>
</style>

301
src/mycomponents/record/recordComDetailCard.vue

@ -1,179 +1,150 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff">
<uni-collapse ref="collapse1" @change=""> <u-collapse ref="collapse1">
<uni-collapse-item :open="true"> <u-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<uni-swipe-action ref="swipeAction"> <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)">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions"> <item-qty :dataContent="dataContent" :isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" </u-swipe-action>
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty> </template>
</uni-swipe-action-item> <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)">
</uni-swipe-action> <balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance>
</template> </u-swipe-action>
<!-- <view class='split_line'></view> --> </u-collapse-item>
<view class="" v-for="(detail,index) in dataContent.subList"> </u-collapse>
<uni-swipe-action ref="swipeAction"> <balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm"></balance-qty-edit>
<uni-swipe-action-item @click="swipeClick($event,detail,index)" <record-detail-popup ref="recordDetailPopupRef"></record-detail-popup>
:right-options="detail.scaned?scanOptions:detailOptions"> <com-message ref="comMessageRef" />
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" </view>
: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>
</template> </template>
<script> <script setup lang="ts">
import itemQty from '@/mycomponents/item/itemQty.vue' import { ref, onMounted, nextTick, watch } from 'vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import itemQty from '@/mycomponents/item/itemQty.vue'
import balance from '@/mycomponents/balance/balance.vue' // import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import balance from '@/mycomponents/balance/balance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue' import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'
import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import { import { getDetailOption, getDetailEditRemoveOption, getClearOption } from '@/common/array.js'
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: {}
},
isShowStatus: { const props = defineProps({
type: Boolean, dataContent: {
default: false type: Object,
}, default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowFromLocation: { isShowStatus: {
type: Boolean, type: Boolean,
default: true default: false
}, },
isShowToLocation: { isShowFromLocation: {
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowBalanceQty: { isShowToLocation: {
type: Boolean, type: Boolean,
default: false default: true
}, },
},
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() { isShowBalanceQty: {
return { type: Boolean,
option: [], default: false
title: "推荐详情", }
showItem: {}, })
editItem: {}, const collapse1 = ref()
detailOptions: [], //
scanOptions: [], watch(
removeOptions: [], () => props.dataContent,
dataList: [] (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(); const emit = defineEmits(['updateData', 'removePack'])
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')
}
}
}
</script> </script>
<style> <style>
::v-deep .u-arrow-down-icon {
margin-right: 0px !important;
}
</style> </style>

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

Loading…
Cancel
Save