王震
2023-09-08 eec77847922467a0ed5631794dbfe9ea2e367032
src/components/view/technical.vue
@@ -74,20 +74,22 @@
            label="交货日期">
          </el-table-column>
          <el-table-column
            prop="type"
            label="状态"
            width="85"
            >
            <template slot-scope="scope">
              {{scope.state==0?'待编制':'已编制'}}
              <span  :style="{'color': scope.row.type==0 ? 'red':'green'}">
                {{scope.row.type==0?'待编制':'已编制'}}
              </span>
            </template>
          </el-table-column>
          <el-table-column
              label="操作"
              width="194">
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="showDetails(scope.row)">查看详情</el-button>
                <el-button type="text" size="small">编辑附件</el-button>
                <!-- <el-button type="text" size="small" @click="showDetails(scope.row)">查看详情</el-button>
                <el-button type="text" size="small">编辑附件</el-button> -->
                <el-button type="text" size="small" @click="authorizedstrength(scope.row)">编制</el-button>
              </template>
            </el-table-column>
      </el-table>
@@ -222,6 +224,7 @@
        id:'',
        date:''
       },
       compiledata:{},
       technicalTable: [],
       showDetail: false,
       selectedRow: {},
@@ -236,6 +239,22 @@
    this.getTechnicalTableData()
  },
  methods: {
      authorizedstrength(row) {
        this.compiledata = row
        this.compile()
        // let ccc = row
        // console.log(row);
      },
      //编制
      compile() {
        console.log();
        this.$axios.post(this.$api.url.compile,{
              id:this.compiledata.id
        }).then( res =>{
        this.$message.success('编制完成')
      })
        this.getTechnicalTableData()
      },
      async showDetails(row){
        this.showDetail = true
        const res = await this.$axios.get(this.$api.url.selectOrderById,{params:{id:row.id}})