|
|
@@ -69,14 +69,19 @@
|
|
|
<uni-table border stripe empty-text="暂无更多数据">
|
|
|
<!-- 表头行 -->
|
|
|
<uni-tr class="custom-table-head">
|
|
|
- <uni-th align="center" width="80px">数量</uni-th>
|
|
|
+ <uni-th align="center" width="80px">箱数</uni-th>
|
|
|
+ <uni-th align="center" width="80px">每箱数量</uni-th>
|
|
|
<uni-th align="center" width="140px">采购单号</uni-th>
|
|
|
<uni-th align="center" width="140px">物料编码</uni-th>
|
|
|
<uni-th align="center" width="140px">送货批次</uni-th>
|
|
|
- <uni-th align="center" width="140px">生产日期</uni-th>
|
|
|
+ <uni-th align="center" width="180px">生产日期</uni-th>
|
|
|
</uni-tr>
|
|
|
<!-- 表格数据行 -->
|
|
|
<uni-tr v-for="(item, key) in scanParams.detail" :key="key">
|
|
|
+ <uni-td align="center"
|
|
|
+ :style="item.state? 'background-color: rgba(109, 205, 50, 1);color: white;': ''">
|
|
|
+ <uni-easyinput v-model="item.bagQty" type="number" :input-border="false" placeholder="请输入箱数" />
|
|
|
+ </uni-td>
|
|
|
<uni-td align="center"
|
|
|
:style="item.state? 'background-color: rgba(109, 205, 50, 1);color: white;': ''">{{ item.receiptQty }}</uni-td>
|
|
|
<uni-td align="center"
|
|
|
@@ -86,7 +91,19 @@
|
|
|
<uni-td align="center"
|
|
|
:style="item.state? 'background-color: rgba(109, 205, 50, 1);color: white;': ''">{{ item.deliverBatch }}</uni-td>
|
|
|
<uni-td align="center"
|
|
|
- :style="item.state? 'background-color: rgba(109, 205, 50, 1);color: white;': ''">{{ item.produceDate }}</uni-td>
|
|
|
+ :style="item.state? 'background-color: rgba(109, 205, 50, 1);color: white;': ''">
|
|
|
+ <!-- 时间选择功能,暂时注释掉 -->
|
|
|
+ <!-- <uni-datetime-picker
|
|
|
+ v-model="item.produceDate"
|
|
|
+ type="datetime"
|
|
|
+ :border="false"
|
|
|
+ placeholder="选择日期时间" /> -->
|
|
|
+ <uni-datetime-picker
|
|
|
+ v-model="item.produceDate"
|
|
|
+ type="date"
|
|
|
+ :border="false"
|
|
|
+ placeholder="选择日期" />
|
|
|
+ </uni-td>
|
|
|
</uni-tr>
|
|
|
</uni-table>
|
|
|
</view>
|
|
|
@@ -366,7 +383,17 @@
|
|
|
mask: true
|
|
|
})
|
|
|
|
|
|
- uni.$reqPost('incomingReceiptMasterCreate', scanParams.value)
|
|
|
+ // 深拷贝参数对象
|
|
|
+ const requestParams = JSON.parse(JSON.stringify(scanParams.value))
|
|
|
+ // 转换生产日期为时间戳
|
|
|
+ requestParams.detail.forEach(item => {
|
|
|
+ if (item.produceDate) {
|
|
|
+ // 将日期字符串转换为时间戳
|
|
|
+ item.produceDate = new Date(item.produceDate).getTime()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ uni.$reqPost('incomingReceiptMasterCreate', requestParams)
|
|
|
.then(({
|
|
|
code,
|
|
|
data,
|