|
|
@@ -227,12 +227,12 @@
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<el-row class="task_bottom u-f u-f-je">
|
|
|
- <el-button size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
|
|
|
- @click="CloseEdit(order.orderno)">编辑</el-button>
|
|
|
- <el-button size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
|
|
|
- @click="openTaskForward(order.orderno)">任务转发</el-button>
|
|
|
+ <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
|
|
|
+ @click="commonCheck(order.orderno,'1')">编辑</el-button>
|
|
|
+ <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
|
|
|
+ @click="commonCheck(order.orderno,'2')">任务转发</el-button>
|
|
|
<el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
|
|
|
- @click="getHistoryList(order.orderno)">报价轨迹</el-button>
|
|
|
+ @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
|
|
|
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
@@ -1130,6 +1130,26 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ //公共操作进行校验,是否可以操作
|
|
|
+ commonCheck(orderno,type) {
|
|
|
+ this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ //如果校验通过,则按分支去走自己的方法
|
|
|
+ if(type=='1'){//编辑
|
|
|
+ this.CloseEdit(orderno);
|
|
|
+ }else if(type=='2'){//任务转发
|
|
|
+ this.openTaskForward(orderno);
|
|
|
+ }else if(type=='3'){//报价轨迹
|
|
|
+ this.getHistoryList(orderno);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//预览文件
|
|
|
viewfile(index) {
|
|
|
let name = index.fileurl.lastIndexOf("\/")
|