feat: 打通出库作业链路
This commit is contained in:
@@ -42,26 +42,26 @@
|
||||
<view class="task-card" v-for="(item, index) in taskList" :key="index"
|
||||
@click="handleTask(item)">
|
||||
<view class="task-header">
|
||||
<text class="task-type">{{ item.typeName }}</text>
|
||||
<text class="task-no">{{ item.taskNo }}</text>
|
||||
<text class="task-type">{{ getInTypeName(item) }}</text>
|
||||
<text class="task-no">{{ item.documentN || item.stockinId }}</text>
|
||||
</view>
|
||||
<view class="task-body">
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">物料编码</text>
|
||||
<text class="info-value">{{ item.productId }}</text>
|
||||
<text class="info-label">主单号</text>
|
||||
<text class="info-value">{{ item.stockinId }}</text>
|
||||
</view>
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">物料名称</text>
|
||||
<text class="info-value">{{ item.productName }}</text>
|
||||
<text class="info-label">仓库</text>
|
||||
<text class="info-value">{{ item.warehouseName || item.warehouseId || '-' }}</text>
|
||||
</view>
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">数量</text>
|
||||
<text class="info-value">{{ item.quantity - item.assignNum }}</text>
|
||||
<text class="info-label">供应商</text>
|
||||
<text class="info-value">{{ item.supplierName || item.counterpart || '-' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="task-footer">
|
||||
<text class="task-time">{{ item.createTime }}</text>
|
||||
<view class="task-status" :class="item.statusClass">{{ item.statusName }}</view>
|
||||
<text class="task-time">{{ getDisplayDate(item) }}</text>
|
||||
<view class="task-status" :class="item.statusClass">{{ item.statusName || getStatusName(item.status) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -70,7 +70,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInboundTaskList } from '@/api/warehouse/inbound'
|
||||
import { getInboundStockinList } from '@/api/warehouse/inbound'
|
||||
import UniIcons from "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
|
||||
|
||||
export default {
|
||||
@@ -91,7 +91,7 @@
|
||||
this.$tab.navigateTo(url)
|
||||
},
|
||||
loadTasks() {
|
||||
getInboundTaskList().then(res => {
|
||||
getInboundStockinList().then(res => {
|
||||
this.taskList = res.rows || []
|
||||
}).catch(() => {
|
||||
this.taskList = []
|
||||
@@ -101,12 +101,33 @@
|
||||
this.loadTasks()
|
||||
this.$modal.showToast('刷新成功')
|
||||
},
|
||||
handleTask(item) {
|
||||
if (item.type === 'bindTray') {
|
||||
this.$tab.navigateTo('/pages/warehouse/inbound/bindTray?taskNo=' + item.taskNo)
|
||||
} else if (item.type === 'supply') {
|
||||
this.$tab.navigateTo('/pages/warehouse/inbound/supply?taskNo=' + item.taskNo)
|
||||
getInTypeName(item) {
|
||||
return item.typeName || item.inTypeName || '入库单'
|
||||
},
|
||||
getStatusName(status) {
|
||||
var map = {
|
||||
'1': '创建',
|
||||
'2': '审核',
|
||||
'3': '执行',
|
||||
'4': '完成',
|
||||
'5': '作废'
|
||||
}
|
||||
return map[String(status)] || '待处理'
|
||||
},
|
||||
getDisplayDate(item) {
|
||||
return item.documentDat || item.createDate || item.createDat || '-'
|
||||
},
|
||||
handleTask(item) {
|
||||
if (item.type === 'supply') {
|
||||
this.$tab.navigateTo('/pages/warehouse/inbound/supply?taskNo=' + (item.taskNo || ''))
|
||||
return
|
||||
}
|
||||
var params = []
|
||||
if (item.stockinId) params.push('stockinId=' + encodeURIComponent(item.stockinId))
|
||||
if (item.warehouseId) params.push('warehouseId=' + encodeURIComponent(item.warehouseId))
|
||||
if (item.warehouseName) params.push('warehouseName=' + encodeURIComponent(item.warehouseName))
|
||||
if (item.documentN) params.push('documentN=' + encodeURIComponent(item.documentN))
|
||||
this.$tab.navigateTo('/pages/warehouse/inbound/bindTray' + (params.length ? '?' + params.join('&') : ''))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user