You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
4.6 KiB

1 year ago
// 详情和审批
export function getDetailAndApproveOption() {
let option_detail = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
12 months ago
text: '提交\n审批',
1 year ago
style: {
backgroundColor: '#00CC33'
}
12 months ago
},
{
text: '关闭',
style: {
backgroundColor: '#ff0000'
}
1 year ago
}
];
return option_detail;
}
//详情、审批通过、审批驳回
export function getDetailAndApprovePassAndApproveNoOption() {
let option_detail = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '审批\n通过',
style: {
backgroundColor: '#00CC33'
}
},
{
text: '审批\n驳回',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail;
}
//详情、处理、审批不通过
export function getDetailAndHandleOption() {
let option_detail = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '处理',
style: {
backgroundColor: '#00CC33'
}
}
];
return option_detail;
}
//详情、关闭
export function getDetailAndCloseOption() {
let option_detail = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '关闭',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail;
}
// 采购退货返回侧滑按钮 详情 、编辑、库位、移除
export function getPurchaseReceiptOption(allowModifyQty,allowModifyLocation) {
var option = []
option.push(...getDetailOption())
if (allowModifyQty == "TRUE") {
option.push(...getEditOption())
}
if (allowModifyLocation == "TRUE") {
option.push(...getLocationOption())
}
option.push(...getRemoveOption())
return option;
}
//详情
export function getDetailOption() {
let option_detail = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
}];
return option_detail;
}
//详情移除(扫描后不允许修改数量)
export function getDetailRemoveOption() {
let option_detail_edit_remove = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail_edit_remove;
}
export function getRemoveOption() {
let option_detail_remove = [{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}];
return option_detail_remove;
}
export function getEditOption() {
let option_detail_edit = [{
text: '编辑',
style: {
backgroundColor: '#F1A532'
}
}];
return option_detail_edit;
}
export function getLocationOption() {
let option_detail_location = [{
text: '库位',
style: {
backgroundColor: '#00A3FF'
}
}];
return option_detail_location;
}
//清空
export function getClearOption() {
let option_detail_edit_remove = [{
text: '清空',
style: {
backgroundColor: '#F56C6C'
}
}];
return option_detail_edit_remove;
}
//详情编辑移除
export function getDetailEditRemoveOption() {
let option_detail_edit_remove = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '编辑',
style: {
backgroundColor: '#F1A532'
}
},
{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail_edit_remove;
}
//详情编辑放弃
export function getDetailGiveupOption() {
let option_detail_giveup = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '放弃',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail_giveup;
}
//详情编辑移除
export function getEditRemoveOption() {
let option_edit_remove = [{
text: '编辑',
style: {
backgroundColor: '#F1A532'
}
},
{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_edit_remove;
}
// 库存状态字典项
export function getInventoryStatusArray() {
let array = [{
text: '待检',
11 months ago
value: "INSP"
1 year ago
}, {
text: '合格',
11 months ago
value: "OK"
1 year ago
}, {
text: '不合格',
11 months ago
value: "NOK"
1 year ago
}, {
text: '隔离',
11 months ago
value: "HOLD"
1 year ago
}, {
text: '报废',
11 months ago
value: "SCRAP"
1 year ago
}]
return array;
}
// 业务类型字典项
export function getBusinessTypeArray() {
let array = [{
text: '供应商发货',
value: "SupplierDeliver"
}, {
text: '采购收货',
value: "PurchaseReceipt"
}, {
text: '采购退货',
value: "PurchaseReturn"
}, {
text: '采购上架',
value: "PurchasePutaway"
}]
return array;
}
export function getLocationTypeArray(data) {
var list = []
if (data == undefined || data == null || data == "") {
return list
}
if (data.indexOf(',') < 0) {
list.push(data)
} else {
var arrayItems = data.split(',')
arrayItems.forEach(res => {
list.push(res)
})
}
return list
}