feat(storegoods): 新增加工进仓模块并适配智盛ERP
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<view>{{ item.bill_type_name }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>接收单位:</view>
|
||||
<view>染厂:</view>
|
||||
<view>{{ item.business_unit_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<view class="myCard">
|
||||
<view class="cardTopName">
|
||||
<text>{{ item.order_no }}</text>
|
||||
<text class="statusTag" :class="'status-' + item.audit_status">{{ item.audit_status_name }}</text>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>加工单位:</view>
|
||||
<view>{{ item.process_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>仓库名称:</view>
|
||||
<view>{{ item.warehouse_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>匹数总计:</view>
|
||||
<view>{{ item.total_roll != null ? item.total_roll : '-' }}</view>
|
||||
</view>
|
||||
<view class="cardRow">
|
||||
<view>创 建 人:</view>
|
||||
<view>{{ item.create_user_name }} {{ formatTime(item.create_time, 'YYYY-MM-DD') }}</view>
|
||||
</view>
|
||||
<view v-if="item.auditor_name" class="cardRow">
|
||||
<view>审 核 人:</view>
|
||||
<view>{{ item.auditor_name }} {{ formatTime(item.audit_date, 'YYYY-MM-DD') }}</view>
|
||||
</view>
|
||||
<view v-if="!isDetail && !isSelect" class="lookDetail">
|
||||
<text>查看详情</text>
|
||||
<u-icon name="arrow-right" size="36" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatDisplayTime } from '@/common/storeGoodsProcessIn';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
item: { type: Object, default: () => ({}) },
|
||||
index: { type: Number, default: 0 },
|
||||
isSelect: { type: Boolean, default: false },
|
||||
isDetail: { type: Boolean, default: false },
|
||||
},
|
||||
methods: {
|
||||
formatTime: formatDisplayTime,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cardTopName {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.statusTag {
|
||||
font-size: 24rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 6rpx;
|
||||
font-weight: normal;
|
||||
}
|
||||
.status-0 { background: #f0f0f0; color: #666; }
|
||||
.status-1 { background: #fff7e6; color: #fa8c16; }
|
||||
.status-2 { background: #f6ffed; color: #52c41a; }
|
||||
.status-3 { background: #fff1f0; color: #f5222d; }
|
||||
.status-4 { background: #f5f5f5; color: #999; }
|
||||
</style>
|
||||
@@ -41,8 +41,7 @@
|
||||
<text class="fabric-out-scanDetailLabel">机号:</text>
|
||||
<text class="fabric-out-scanDetailValue">{{ detail.machine_number || '' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailCheck" @click="toggleGroup('volume_number')">
|
||||
<checkbox :checked="isGroupChecked('volume_number')" />
|
||||
<view class="fabric-out-scanDetailCell">
|
||||
<text class="fabric-out-scanDetailLabel">布号:</text>
|
||||
<text class="fabric-out-scanDetailValue">{{ detail.volume_number || '' }}</text>
|
||||
</view>
|
||||
@@ -90,10 +89,13 @@
|
||||
<script>
|
||||
import {
|
||||
SCAN_DETAIL_TABLE_COLUMNS,
|
||||
SCAN_GROUP_OPTIONS,
|
||||
getScanDetailTableWidth,
|
||||
buildScanDetailTableRows,
|
||||
} from '@/common/storeFabricBusinessOut';
|
||||
|
||||
const LOCKABLE_GROUP_KEYS = SCAN_GROUP_OPTIONS.map((item) => item.key);
|
||||
|
||||
export default {
|
||||
props: {
|
||||
detail: { type: Object, default: () => ({}) },
|
||||
@@ -123,6 +125,7 @@ export default {
|
||||
return (this.groupKeys || []).includes(key);
|
||||
},
|
||||
toggleGroup(key) {
|
||||
if (!LOCKABLE_GROUP_KEYS.includes(key)) return;
|
||||
const next = [...(this.groupKeys || [])];
|
||||
const index = next.indexOf(key);
|
||||
if (index >= 0) next.splice(index, 1);
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<view>
|
||||
<view v-if="canScan" class="flex-white-plr26 ptb20 bdb_f5 fabric-out-scanRow process-in-binRow">
|
||||
<text class="mr26 process-in-binLabel">仓位<text class="redXingh">*</text></text>
|
||||
<input
|
||||
type="text"
|
||||
:value="code"
|
||||
class="fabric-out-scanInput"
|
||||
placeholder="请先扫描仓位"
|
||||
@input="$emit('code-input', $event.detail.value)"
|
||||
@confirm="$emit('confirm')"
|
||||
/>
|
||||
<text v-if="name" class="process-in-binName">{{ name }}</text>
|
||||
<u-icon
|
||||
v-if="showPhoneScan"
|
||||
class="fabric-out-phoneScanIcon"
|
||||
name="scan"
|
||||
size="44"
|
||||
color="#2979ff"
|
||||
@click="$emit('phone-scan')"
|
||||
/>
|
||||
<text v-if="binId" class="process-in-binClear" @click="$emit('clear')">更换</text>
|
||||
</view>
|
||||
<view v-else-if="showDisabledTip" class="fabric-out-scanTip">{{ disabledTip }}</view>
|
||||
<view v-if="canScan && !binId" class="fabric-out-scanTip">请先扫描仓位,再扫描布匹二维码</view>
|
||||
<view v-if="canScan && binId" class="fabric-out-msgTip">当前仓位:{{ name || code }}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
canScan: { type: Boolean, default: false },
|
||||
binId: { type: [Number, String], default: 0 },
|
||||
code: { type: String, default: '' },
|
||||
name: { type: String, default: '' },
|
||||
showPhoneScan: { type: Boolean, default: false },
|
||||
showDisabledTip: { type: Boolean, default: true },
|
||||
disabledTip: { type: String, default: '请先提交保存后再扫仓位' },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
||||
|
||||
.process-in-binRow {
|
||||
background: #fff;
|
||||
}
|
||||
.process-in-binLabel {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.fabric-out-phoneScanIcon {
|
||||
margin-left: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.process-in-binName {
|
||||
margin-left: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
max-width: 200rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.process-in-binClear {
|
||||
margin-left: 16rpx;
|
||||
font-size: 26rpx;
|
||||
color: #2979ff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="fabric-out-sectionTitle">{{ title }}</view>
|
||||
<slot name="before-list" />
|
||||
<view class="fabric-out-detailList">
|
||||
<dataNull
|
||||
v-if="!groups.length"
|
||||
src="/src/static/img/chahua/gjNull.png"
|
||||
title="暂无进仓明细"
|
||||
title1="扫码后将在此展示"
|
||||
/>
|
||||
<view
|
||||
v-for="product in groups"
|
||||
:key="product.group_key"
|
||||
class="fabric-out-detailCard process-in-productCard"
|
||||
>
|
||||
<view class="process-in-productHead">
|
||||
<text class="process-in-productTitle">
|
||||
{{ product.product_code || '-' }}
|
||||
<text v-if="product.product_name" class="process-in-subText"> {{ product.product_name }}</text>
|
||||
</text>
|
||||
<text class="process-in-productSum">
|
||||
匹数 {{ product.in_roll }} / 数量 {{ product.in_weight }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-for="color in product.colors"
|
||||
:key="color.group_key"
|
||||
class="process-in-colorBlock"
|
||||
>
|
||||
<view class="process-in-colorHead">
|
||||
<text class="process-in-colorTitle">
|
||||
色号 {{ color.product_color_code || '-' }}
|
||||
<text v-if="color.product_color_name" class="process-in-subText">
|
||||
{{ color.product_color_name }}
|
||||
</text>
|
||||
</text>
|
||||
<text class="process-in-colorSum">
|
||||
匹数 {{ color.in_roll }} / 数量 {{ color.in_weight }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="process-in-colorMeta">
|
||||
<text>染整单:{{ color.quote_order_no || '-' }}</text>
|
||||
<text>缸号:{{ color.dye_factory_dyelot_number || '-' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="process-in-fcTitle">细码({{ color.fine_codes.length }})</view>
|
||||
<view v-if="!color.fine_codes.length" class="process-in-fcEmpty">暂无细码</view>
|
||||
<scroll-view v-else scroll-x class="process-in-fcScroll">
|
||||
<view class="process-in-fcTable" :style="{ width: fineTableWidth }">
|
||||
<view class="process-in-fcRow process-in-fcHead">
|
||||
<view
|
||||
v-for="col in fineColumns"
|
||||
:key="col.key"
|
||||
class="process-in-fcCell"
|
||||
:style="cellStyle(col)"
|
||||
>{{ col.label }}</view>
|
||||
</view>
|
||||
<view
|
||||
v-for="(fc, fcIndex) in color.fine_codes"
|
||||
:key="fc.id || fcIndex"
|
||||
class="process-in-fcRow"
|
||||
>
|
||||
<view
|
||||
v-for="col in fineColumns"
|
||||
:key="col.key"
|
||||
class="process-in-fcCell"
|
||||
:class="{ 'process-in-fcAction': col.key === 'action' }"
|
||||
:style="cellStyle(col)"
|
||||
@click="onCellTap(col.key, fc)"
|
||||
>{{ formatFineCell(fc, col.key) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view v-if="deletable && color.fine_codes.length" class="process-in-fcTip">
|
||||
勾选上方「删除」后扫码,或点击「删除」列移除细码
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { buildItemGroups } from '@/common/storeGoodsProcessIn';
|
||||
|
||||
const FINE_COLUMNS = [
|
||||
{ label: '卷号', key: 'volume_number', width: 90 },
|
||||
{ label: '匹数', key: 'roll', width: 90 },
|
||||
{ label: '数量', key: 'weight', width: 110 },
|
||||
{ label: '条码', key: 'bar_code', width: 220 },
|
||||
{ label: '仓位', key: 'warehouse_bin_name', width: 120 },
|
||||
{ label: '缸号', key: 'dye_factory_dyelot_number', width: 140 },
|
||||
];
|
||||
|
||||
export default {
|
||||
props: {
|
||||
list: { type: Array, default: () => [] },
|
||||
title: { type: String, default: '进仓明细' },
|
||||
deletable: { type: Boolean, default: false },
|
||||
},
|
||||
computed: {
|
||||
groups() {
|
||||
return buildItemGroups(this.list);
|
||||
},
|
||||
fineColumns() {
|
||||
if (!this.deletable) return FINE_COLUMNS;
|
||||
return [...FINE_COLUMNS, { label: '操作', key: 'action', width: 90 }];
|
||||
},
|
||||
fineTableWidth() {
|
||||
const total = this.fineColumns.reduce((sum, col) => sum + (col.width || 100), 0);
|
||||
return `${total}rpx`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
cellStyle(col) {
|
||||
return {
|
||||
width: `${col.width}rpx`,
|
||||
minWidth: `${col.width}rpx`,
|
||||
maxWidth: `${col.width}rpx`,
|
||||
};
|
||||
},
|
||||
formatFineCell(fc, key) {
|
||||
if (key === 'action') return '删除';
|
||||
const val = fc[key];
|
||||
if (val === 0) return '0';
|
||||
return val != null && val !== '' ? val : '-';
|
||||
},
|
||||
onCellTap(key, fc) {
|
||||
if (!this.deletable || key !== 'action') return;
|
||||
this.$emit('delete', fc);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
||||
|
||||
.process-in-productCard {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.process-in-productHead {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
background: #f0f7ff;
|
||||
border-bottom: 1rpx solid #e6f0ff;
|
||||
}
|
||||
.process-in-productTitle {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
flex: 1;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
.process-in-productSum,
|
||||
.process-in-colorSum {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.process-in-subText {
|
||||
font-weight: normal;
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.process-in-colorBlock {
|
||||
padding: 16rpx 20rpx 20rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.process-in-colorBlock:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.process-in-colorHead {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.process-in-colorTitle {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
padding-right: 12rpx;
|
||||
}
|
||||
.process-in-colorMeta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #888;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.process-in-fcTitle {
|
||||
font-size: 24rpx;
|
||||
color: #2979ff;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.process-in-fcEmpty {
|
||||
font-size: 24rpx;
|
||||
color: #bbb;
|
||||
padding: 8rpx 0;
|
||||
}
|
||||
.process-in-fcScroll {
|
||||
width: 100%;
|
||||
}
|
||||
.process-in-fcTable {
|
||||
border: 1rpx solid #eee;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.process-in-fcRow {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.process-in-fcRow:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.process-in-fcHead {
|
||||
background: #fafafa;
|
||||
}
|
||||
.process-in-fcCell {
|
||||
box-sizing: border-box;
|
||||
padding: 10rpx 8rpx;
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
border-right: 1rpx solid #f0f0f0;
|
||||
word-break: break-all;
|
||||
}
|
||||
.process-in-fcHead .process-in-fcCell {
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
}
|
||||
.process-in-fcCell:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.process-in-fcAction {
|
||||
color: #f5222d;
|
||||
}
|
||||
.process-in-fcTip {
|
||||
margin-top: 8rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<view class="fabric-out-scanDetail">
|
||||
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
|
||||
<text class="fabric-out-scanDetailCell">染整单号:{{ detail.quote_order_no || '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">缸号:{{ detail.dyelot_number || '-' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
|
||||
<text class="fabric-out-scanDetailCell">卷号:{{ detail.volume_number || '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">成品编号:{{ detail.product_code || '-' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
|
||||
<text class="fabric-out-scanDetailCell">成品色号:{{ detail.product_color_code || '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">本行匹数:{{ detail.item_roll != null ? detail.item_roll : '-' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow fabric-out-scanDetailRow--2col">
|
||||
<text class="fabric-out-scanDetailCell">本行数量:{{ detail.item_weight != null ? detail.item_weight : '-' }}</text>
|
||||
<text class="fabric-out-scanDetailCell">本单匹数:{{ detail.order_roll != null ? detail.order_roll : '-' }}</text>
|
||||
</view>
|
||||
<view class="fabric-out-scanDetailRow">
|
||||
<text class="fabric-out-scanDetailLabel">本单数量:</text>
|
||||
<text class="fabric-out-scanDetailValue">{{ detail.order_weight != null ? detail.order_weight : '-' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
detail: { type: Object, default: () => ({}) },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user