|
|
@@ -51,15 +51,14 @@
|
|
|
<view class="item-info">
|
|
|
<view class="item-name-row">
|
|
|
<text class="item-name" :class="{'status-0': getAuditStatus(item) == 0, 'status-2': getAuditStatus(item) == 3}">{{ getItemName(item) }}</text>
|
|
|
- <text class="item-measure">{{ getMeasureName(item) }}</text>
|
|
|
</view>
|
|
|
<view class="item-sub-row">
|
|
|
<text class="item-sub-title">{{ getItemTypeName(item) }}</text>
|
|
|
- <text class="item-stock">库存: {{ getStockNum(item) }}</text>
|
|
|
+ <text class="item-stock">库存: {{ getStockNum(item) }} {{ getMeasureName(item) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item-actions">
|
|
|
- <view v-if="getAuditStatus(item) == 0 && !item.isSelected! && canDeleteMaterial(item)" class="delete-btn" @click.stop="handleDeleteMaterial(item)">
|
|
|
+ <view v-if="getAuditStatus(item) == 0 && !item.isSelected! && canDeleteMaterial(item)" class="material-delete-btn" @click.stop="handleDeleteMaterial(item)">
|
|
|
<text class="delete-icon">×</text>
|
|
|
</view>
|
|
|
<view v-if="item.isSelected" class="added-btn">
|
|
|
@@ -105,34 +104,40 @@
|
|
|
>
|
|
|
<view class="selected-item-row1">
|
|
|
<text class="selected-item-name">{{ selItem.itemName }}</text>
|
|
|
- <text class="selected-item-measure">{{ selItem.measureName }}</text>
|
|
|
- <view class="quantity-control">
|
|
|
- <view class="qty-btn" @click="decreaseQty(selIndex)">
|
|
|
- <text class="qty-btn-text">-</text>
|
|
|
+ </view>
|
|
|
+ <view class="selected-item-body">
|
|
|
+ <view class="selected-item-content">
|
|
|
+ <view class="selected-item-row1-extra">
|
|
|
+ <view class="quantity-control">
|
|
|
+ <view class="qty-btn" @click="decreaseQty(selIndex)">
|
|
|
+ <text class="qty-btn-text">-</text>
|
|
|
+ </view>
|
|
|
+ <input
|
|
|
+ class="quantity-input"
|
|
|
+ type="digit"
|
|
|
+ v-model="selItem.qty"
|
|
|
+ placeholder="数量"
|
|
|
+ />
|
|
|
+ <view class="qty-btn" @click="increaseQty(selIndex)">
|
|
|
+ <text class="qty-btn-text">+</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <text class="selected-item-measure">{{ selItem.measureName }}</text>
|
|
|
</view>
|
|
|
- <input
|
|
|
- class="quantity-input"
|
|
|
- type="digit"
|
|
|
- v-model="selItem.qty"
|
|
|
- placeholder="数量"
|
|
|
- />
|
|
|
- <view class="qty-btn" @click="increaseQty(selIndex)">
|
|
|
- <text class="qty-btn-text">+</text>
|
|
|
+ <view class="selected-item-row2">
|
|
|
+ <input
|
|
|
+ class="selected-item-remark"
|
|
|
+ type="text"
|
|
|
+ v-model="selItem.remark"
|
|
|
+ placeholder="备注"
|
|
|
+ :maxlength="200"
|
|
|
+ />
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="delete-btn" @click="removeSelected(selIndex)">
|
|
|
+ <view class="selected-delete-btn" @click="removeSelected(selIndex)">
|
|
|
<text class="delete-icon">×</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="selected-item-row2">
|
|
|
- <input
|
|
|
- class="selected-item-remark"
|
|
|
- type="text"
|
|
|
- v-model="selItem.remark"
|
|
|
- placeholder="备注"
|
|
|
- :maxlength="200"
|
|
|
- />
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -178,14 +183,14 @@
|
|
|
</view>
|
|
|
<view class="form-item-input">
|
|
|
<text class="label-picker">物料名称</text>
|
|
|
- <view class="view-input-picker">
|
|
|
- <input class="input-picker" type="text" placeholder="请输入物料名称" v-model="newMaterial.itemName" />
|
|
|
+ <view class="view-textarea-picker">
|
|
|
+ <textarea class="textarea-picker" placeholder="请输入物料名称" v-model="newMaterial.itemName" maxlength="100" :auto-height="true" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="form-item-input">
|
|
|
<text class="label-picker">规格型号</text>
|
|
|
- <view class="view-input-picker">
|
|
|
- <input class="input-picker" type="text" placeholder="请输入规格型号" v-model="newMaterial.specification" />
|
|
|
+ <view class="view-textarea-picker">
|
|
|
+ <textarea class="textarea-picker" placeholder="请输入规格型号" v-model="newMaterial.specification" maxlength="100" :auto-height="true" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="form-item-input">
|
|
|
@@ -1087,15 +1092,21 @@ onMounted(() => {
|
|
|
.item-header {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
+ align-items: flex-start;
|
|
|
margin-bottom: 10rpx;
|
|
|
}
|
|
|
|
|
|
+ .item-info {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ }
|
|
|
+
|
|
|
.item-actions {
|
|
|
+ flex-shrink: 0;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
gap: 10rpx;
|
|
|
+ margin-left: 20rpx;
|
|
|
}
|
|
|
|
|
|
.item-title {
|
|
|
@@ -1105,6 +1116,12 @@ onMounted(() => {
|
|
|
font-size: 28rpx;
|
|
|
color: #333333;
|
|
|
font-weight: bold;
|
|
|
+ word-break: break-all;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
|
|
&.status-0 {
|
|
|
color: #ff4d4f;
|
|
|
@@ -1115,8 +1132,9 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
.item-name-row {
|
|
|
- flex-direction: row;
|
|
|
- align-items: center;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-items: flex-start;
|
|
|
}
|
|
|
.item-measure {
|
|
|
font-size: 24rpx;
|
|
|
@@ -1240,11 +1258,24 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.selected-item-row1 {
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .selected-item-row1-extra {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
+ .selected-item-body {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ }
|
|
|
+
|
|
|
+ .selected-item-content {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+
|
|
|
.selected-item-row2 {
|
|
|
margin-top: 10rpx;
|
|
|
}
|
|
|
@@ -1252,10 +1283,8 @@ onMounted(() => {
|
|
|
.selected-item-name {
|
|
|
font-size: 26rpx;
|
|
|
color: #333333;
|
|
|
- margin-right: 20rpx;
|
|
|
font-weight: 500;
|
|
|
- max-width: 180rpx;
|
|
|
- flex-shrink: 0;
|
|
|
+ word-break: break-all;
|
|
|
}
|
|
|
|
|
|
.selected-item-remark-row {
|
|
|
@@ -1284,8 +1313,7 @@ onMounted(() => {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
- margin-left: auto;
|
|
|
- margin-right: 20rpx;
|
|
|
+ margin-right: auto;
|
|
|
flex-shrink: 0;
|
|
|
}
|
|
|
|
|
|
@@ -1306,7 +1334,7 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
.quantity-input {
|
|
|
- width: 160rpx;
|
|
|
+ width: 220rpx;
|
|
|
height: 44rpx;
|
|
|
background-color: #f5f5f5;
|
|
|
border-radius: 6rpx;
|
|
|
@@ -1323,15 +1351,31 @@ onMounted(() => {
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
|
|
|
- .delete-btn {
|
|
|
- width: 40rpx;
|
|
|
- height: 40rpx;
|
|
|
- border-radius: 20rpx;
|
|
|
+ /* 物料列表的删除按钮 */
|
|
|
+ .material-delete-btn {
|
|
|
+ width: 44rpx;
|
|
|
+ height: 44rpx;
|
|
|
+ border-radius: 22rpx;
|
|
|
background-color: #ff4d4f;
|
|
|
+ color: #FFFFFF;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
display: flex;
|
|
|
- flex-shrink: 0; // 防止删除按钮被压缩
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 选中物料列表的删除按钮 */
|
|
|
+ .selected-delete-btn {
|
|
|
+ width: 44rpx;
|
|
|
+ height: 44rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: #ff4d4f;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ display: flex;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-left: 16rpx;
|
|
|
+ align-self: center;
|
|
|
}
|
|
|
|
|
|
.delete-icon {
|
|
|
@@ -1474,6 +1518,29 @@ onMounted(() => {
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
|
|
|
+ .view-textarea-picker {
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .textarea-picker {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 120rpx;
|
|
|
+ padding: 20rpx 24rpx;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333333;
|
|
|
+ border: 1rpx solid #e5e5e5;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ .textarea-picker:focus {
|
|
|
+ outline: none;
|
|
|
+ border-color: #007aff;
|
|
|
+ background-color: #ffffff;
|
|
|
+ }
|
|
|
+
|
|
|
.form-item-btn {
|
|
|
margin-top: 30rpx;
|
|
|
display: flex;
|