licp
2024-03-18 464c4f614e1d3f80209cf7f99bacdce41fc8cef4
完成检验下单-查看详情,审批功能
已修改4个文件
92 ■■■■ 文件已修改
src/assets/api/controller.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspection-order.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -118,6 +118,8 @@
    addInsOrder: "/insOrder/addInsOrder", //添加检验下单数据
    selectOrderManDay: "/insOrder/selectOrderManDay", //查询订单总共预计时间
    upInsOrder: "/insOrder/upInsOrder", //检验下发
  getInsOrder: "/insOrder/getInsOrder", //查询检验下单内容详情
  upInsOrderOfState: "/insOrder/upInsOrderOfState", //审核检验单机进行状态修改
}
const sampleOrder = {
src/components/do/b1-ins-order/add.vue
@@ -70,7 +70,7 @@
    .ins_order_add .el-table__row .cell {
        font-size: 12px;
    }
    .ins_order_add .el-table .warning-row .cell{
        color: #bababa;
    }
@@ -82,13 +82,15 @@
            <el-row class="title">
                <el-col :span="6" style="padding-left: 20px;">委托单信息</el-col>
                <el-col :span="18" style="text-align: right;">
                    <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;">
                    <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active<2">
                        <el-option v-for="(a, ai) in templates" :key="ai" :value="a.value" :label="a.label"></el-option>
                    </el-select>
                    <el-button size="medium" @click="">
                    <el-button size="medium" @click="" v-show="active<2">
                        <span style="color: #3A7BFA;">保存模板</span>
                    </el-button>
                    <el-button size="medium" type="primary" @click="save" :loading="saveLoad">提交</el-button>
                    <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active<2">提交</el-button>
          <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3">审核不通过</el-button>
          <el-button size="medium" type="primary" @click="upInsOrderOfState(1)" :loading="saveLoad" v-show="active==3">审核通过</el-button>
                    <el-button size="medium" @click="$parent.playOrder(0)">
                        <span style="color: #3A7BFA;">返回</span>
                    </el-button>
@@ -159,9 +161,9 @@
        </div>
        <div>
            <div style="text-align: right;line-height: 45px;">
                <el-button type="primary" size="small" @click="addSampleDia = true">添加样品</el-button>
                <el-button type="primary" size="small" @click="addSampleDia = true" v-show="active<2">添加样品</el-button>
                <el-button size="small" @click="delSample">
                    <span style="color: #3A7BFA;">删除样品</span>
                    <span style="color: #3A7BFA;" v-show="active<2">删除样品</span>
                </el-button>
            </div>
            <el-table class="el-table" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark" border
@@ -209,7 +211,7 @@
                <el-table-column label="操作" width="65" align="center">
                    <template slot-scope="scope">
                        {{scope.index}}
                        <el-button type="text" size="small" @click="sampleList.splice(scope.$index, 1)">删除</el-button>
                        <el-button type="text" size="small" @click="sampleList.splice(scope.$index, 1)" :disabled="active!=1">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -347,6 +349,16 @@
        components: {
            ValueTable
        },
    props:{
      active: {
                type: Number,
                default: () => 0
            },
      currentId:{
        type: Number,
                default: () => 0
      }
    },
        data() {
            return {
                template: null,
@@ -421,6 +433,19 @@
            this.selectEnumByCategoryForType()
            this.getUserNow()
            this.selectStandardTreeList()
      if(this.active==1){
        // 下单流程
      }else {
        // 查看/审核流程
        // 请求接口,回显数据
        this.$axios.post(this.$api.insOrder.getInsOrder, {
                    orderId: this.currentId
                }).then(res => {
          this.addObj = {...res.data.insOrder};
          this.addObj.type = String(this.addObj.type)
          this.sampleList = res.data.sampleProduct
                })
      }
        },
        methods: {
            selectEnumByCategoryForType() {
@@ -461,6 +486,22 @@
                    this.$parent.playOrder(0)
                })
            },
      upInsOrderOfState(state){
        this.saveLoad = true
                this.$axios.post(this.$api.insOrder.upInsOrderOfState,{
                    state,
          id:this.currentId
                },{
                    headers: {
                        'Content-Type': 'application/json'
                    }
                }).then(res=>{
                    this.saveLoad = false
                    if(res.code==201)return
                    this.$message.success('提交成功')
                    this.$parent.playOrder(0)
                })
      },
            getUserNow() {
                this.$axios.get(this.$api.user.getUserNow).then(res => {
                    let selects = res.data
@@ -621,4 +662,4 @@
            }
        }
    }
</script>
</script>
src/components/view/b1-inspection-order.vue
@@ -16,13 +16,13 @@
        align-items: center;
        height: 50px;
    }
    .search_label {
        width: 120px;
        font-size: 14px;
        text-align: right;
    }
    .search_input {
        width: calc(100% - 120px);
    }
@@ -179,8 +179,8 @@
                </div>
            </el-dialog>
        </div>
        <div style="width: 100%;height: 100%;" v-if="active == 1">
            <Add />
        <div style="width: 100%;height: 100%;" v-if="active >0">
            <Add :active="active" :currentId="currentId" />
        </div>
    </div>
</template>
@@ -347,7 +347,8 @@
                    },
                ],
                tabIndex: 0,
                active: 0
                active: 0,//1:下单,2:查看,3:审核
        currentId:null
            }
        },
        mounted() {
@@ -411,12 +412,14 @@
            },
            // 详情
            selectAllByOne(row) {
                console.log(row);
                //打开弹框
                this.dialogVisible = true;
                //row = 点击对应行值
                //复制给formData
                this.formData = this.HaveJson(row);
        this.active = 2;
                // console.log(row);
                // //打开弹框
                // this.dialogVisible = true;
                // //row = 点击对应行值
                // //复制给formData
                // this.formData = this.HaveJson(row);
        this.currentId = row.id
            },
            // 数据查看
            handleDataLook(row) {
@@ -427,7 +430,9 @@
            },
            // 审核
            handleVerify(row) {
                this.verifyDialogVisible = true;
                // this.verifyDialogVisible = true;
        this.active = 3;
        this.currentId = row.id
            },
            // 撤销
            handlEquash(row) {
@@ -501,4 +506,4 @@
            }
        }
    }
</script>
</script>
src/main.js
@@ -13,7 +13,7 @@
//本地
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.0.24:8001';
//胜云服务器
// Vue.prototype.LOCATIONVUE = "http://syxt.shxiao2.cn";
// const javaApi = 'http://122.114.52.69:8001';