|
|
|
@ -105,8 +105,8 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" v-if="scope.row.status==='ISSUE'" @click="closeNotifyModel(scope.row)">关闭</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.status==='CLOSED'" @click="openNotify(scope.row)">开启</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="previewInventory(scope.row)" style="margin-left: 10px;">预览</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="pushToWcs(scope.row)" style="margin-left: 10px;">推送WCS</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.pushWcsFlag!=='推送完成'" @click="previewInventory(scope.row)" style="margin-left: 10px;">推送WCS</a> |
|
|
|
<!-- <a type="text" size="small" v-if="scope.row.pushWcsFlag!=='Y'" @click="pushToWcs(scope.row)" style="margin-left: 10px;">推送WCS</a>--> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -154,6 +154,19 @@ |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- 是否推送WCS - rqrq --> |
|
|
|
<el-table-column |
|
|
|
prop="pushWmsFlag" |
|
|
|
label="是否推送WCS" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: scope.row.pushWmsFlag === 'Y' ? '#67C23A' : '#909399'}"> |
|
|
|
{{ scope.row.pushWmsFlag === 'Y' ? '是' : '否' }} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
|
@ -329,8 +342,10 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" class="yzzButtonAn" @click="pushToWCS">推送至WCS</el-button> |
|
|
|
<el-button @click="previewDialogVisible = false">关闭</el-button> |
|
|
|
<el-button type="primary" class="yzzButtonAn" @click="pushToWCS" :disabled="previewLoading"> |
|
|
|
{{ previewLoading ? '推送中...' : '推送至WCS' }} |
|
|
|
</el-button> |
|
|
|
<el-button @click="previewDialogVisible = false" :disabled="previewLoading">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -1011,7 +1026,6 @@ |
|
|
|
previewDialogVisible: false, |
|
|
|
previewLoading: false, |
|
|
|
previewData: [], |
|
|
|
currentRow: {} // 当前查看的申请单行数据 |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -1225,9 +1239,11 @@ |
|
|
|
// 从预览对话框推送至WCS |
|
|
|
pushToWCS() { |
|
|
|
// 筛选绿色和黄色的数据(orderSatisfactionStatus = 1 或 2) |
|
|
|
const validData = this.previewData.filter(item => |
|
|
|
item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2 |
|
|
|
) |
|
|
|
// const validData = this.previewData.filter(item => |
|
|
|
// item.orderSatisfactionStatus === 1 || item.orderSatisfactionStatus === 2 |
|
|
|
// ) |
|
|
|
//全部推送 后端判断 |
|
|
|
const validData = this.previewData |
|
|
|
|
|
|
|
if (validData.length === 0) { |
|
|
|
this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)') |
|
|
|
@ -1239,6 +1255,9 @@ |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
// 显示加载状态 - rqrq |
|
|
|
this.previewLoading = true |
|
|
|
|
|
|
|
const inData = { |
|
|
|
site: this.currentRow.site, |
|
|
|
notifyNo: this.currentRow.notifyNo, |
|
|
|
@ -1246,6 +1265,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
pushInventoryToWcs(inData).then(({data}) => { |
|
|
|
this.previewLoading = false |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({ |
|
|
|
message: '推送WCS成功', |
|
|
|
@ -1255,13 +1275,17 @@ |
|
|
|
this.previewDialogVisible = false |
|
|
|
this.searchTable() |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
this.$alert(data.msg || '推送失败', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('推送WCS失败') |
|
|
|
}).catch((error) => { |
|
|
|
this.previewLoading = false |
|
|
|
this.$message.error(error.message || '推送WCS失败,请重试') |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消操作 - rqrq |
|
|
|
console.log('用户取消推送') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|