常熟吴彦祖 3 months ago
parent
commit
10abd68607
  1. 46
      src/views/modules/orderIssure/searchIssureNotify.vue

46
src/views/modules/orderIssure/searchIssureNotify.vue

@ -105,8 +105,8 @@
<template slot-scope="scope"> <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==='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.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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -154,6 +154,19 @@
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</template> </template>
</el-table-column> </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-table>
</el-tab-pane> </el-tab-pane>
@ -329,8 +342,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<span slot="footer" class="dialog-footer"> <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> </span>
</el-dialog> </el-dialog>
@ -1011,7 +1026,6 @@
previewDialogVisible: false, previewDialogVisible: false,
previewLoading: false, previewLoading: false,
previewData: [], previewData: [],
currentRow: {} //
} }
}, },
mounted () { mounted () {
@ -1225,9 +1239,11 @@
// WCS // WCS
pushToWCS() { pushToWCS() {
// 绿orderSatisfactionStatus = 1 2 // 绿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) { if (validData.length === 0) {
this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)') this.$message.warning('没有可推送的数据(只推送绿色和黄色状态的数据)')
@ -1239,6 +1255,9 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// - rqrq
this.previewLoading = true
const inData = { const inData = {
site: this.currentRow.site, site: this.currentRow.site,
notifyNo: this.currentRow.notifyNo, notifyNo: this.currentRow.notifyNo,
@ -1246,6 +1265,7 @@
} }
pushInventoryToWcs(inData).then(({data}) => { pushInventoryToWcs(inData).then(({data}) => {
this.previewLoading = false
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: '推送WCS成功', message: '推送WCS成功',
@ -1255,13 +1275,17 @@
this.previewDialogVisible = false this.previewDialogVisible = false
this.searchTable() this.searchTable()
} else { } else {
this.$alert(data.msg, '错误', {
this.$alert(data.msg || '推送失败', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
}).catch(() => {
this.$message.error('推送WCS失败')
}).catch((error) => {
this.previewLoading = false
this.$message.error(error.message || '推送WCS失败,请重试')
}) })
}).catch(() => {
// - rqrq
console.log('用户取消推送')
}) })
}, },

Loading…
Cancel
Save