|
|
@@ -66,17 +66,14 @@
|
|
|
<el-button type="text" @click="myLook(row)">查 看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="审核结果" width="150">
|
|
|
- <template #default='{row}'>
|
|
|
- <el-select
|
|
|
- @change='change'
|
|
|
- v-model="row.auditResultDan"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option label="入库" :value="4"></el-option>
|
|
|
- <el-option label="不入库" :value="3"></el-option>
|
|
|
- <el-option label="审核不通过" :value="2"></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-table-column label="审核结果" width="200">
|
|
|
+ <template #default='scopt' >
|
|
|
+<el-switch
|
|
|
+ @click.native="myswitch1(scopt.$index,scopt.row.id)"
|
|
|
+ v-model="switch1[scopt.$index]"
|
|
|
+ active-text="入库"
|
|
|
+ inactive-text="不入库">
|
|
|
+</el-switch>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -89,10 +86,20 @@
|
|
|
label-width="100px"
|
|
|
class="demo-ruleForm"
|
|
|
>
|
|
|
+ <el-form-item label="审核结果:" prop="textarea" style="width: 100%">
|
|
|
+ <el-select
|
|
|
+ v-model="myresult"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option label="审核通过" :value="3"></el-option>
|
|
|
+ <el-option label="审核不通过" :value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="审核说明:" prop="textarea" style="width: 100%">
|
|
|
<el-input
|
|
|
type="textarea"
|
|
|
- :rows="3"
|
|
|
+ :rows="2"
|
|
|
v-model="fromData.textarea"
|
|
|
placeholder="请输入"
|
|
|
></el-input>
|
|
|
@@ -101,7 +108,7 @@
|
|
|
</div>
|
|
|
<!-- 最下面的按钮 -->
|
|
|
<div class="button">
|
|
|
- <el-button type="primary">提交</el-button>
|
|
|
+ <el-button type="primary" @click='submit'>提交</el-button>
|
|
|
<el-button @click="$router.go(-1)">返回</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -113,7 +120,7 @@
|
|
|
|
|
|
<script>
|
|
|
import axios from '@/utils/request'
|
|
|
-import { getHoldingList } from '@/apis/holding'
|
|
|
+import { getHoldingList, auditH0Tow, entering } from '@/apis/holding'
|
|
|
import TabList from '@/components/tabLeft.vue'
|
|
|
import Holding0AuditDia from './holding0_audit_Dia.vue'
|
|
|
export default {
|
|
|
@@ -123,6 +130,9 @@ export default {
|
|
|
data () {
|
|
|
// 这里存放数据
|
|
|
return {
|
|
|
+ mySrt: {},
|
|
|
+ switch1: [],
|
|
|
+ myresult: 3,
|
|
|
myObj: {},
|
|
|
baseURL: '',
|
|
|
// 数据显示
|
|
|
@@ -147,10 +157,21 @@ export default {
|
|
|
watch: { },
|
|
|
// 方法集合
|
|
|
methods: {
|
|
|
- // 多选框发生变化
|
|
|
- change (val) {
|
|
|
- console.log(666, val)
|
|
|
- this.$forceUpdate()
|
|
|
+ // 点击入库
|
|
|
+ myswitch1 (ind, id) {
|
|
|
+ // console.log(id)
|
|
|
+ // console.log(this.switch1[ind])
|
|
|
+ this.mySrt[id] = this.switch1[ind] ? 1 : 0
|
|
|
+ },
|
|
|
+ // 点击提交
|
|
|
+ async submit () {
|
|
|
+ const res = await auditH0Tow({ id: this.myData.id, status: this.myresult, reason: this.fromData.textarea })
|
|
|
+ const res2 = await entering(this.mySrt)
|
|
|
+ if (res.code === 0 && res2.code === 0) {
|
|
|
+ this.$message.success('提交成功')
|
|
|
+ this.$router.push('/layout/holding0')
|
|
|
+ }
|
|
|
+ // console.log(6666, res)
|
|
|
},
|
|
|
// 点击查看
|
|
|
myLook (val) {
|
|
|
@@ -167,7 +188,7 @@ export default {
|
|
|
v.integrity = this.spoil(v.integrity)
|
|
|
v.numTypeId = this.mycategory(v.numTypeId)
|
|
|
v.repair = this.mySave(v.repair)
|
|
|
- v.auditResultDan = 4
|
|
|
+ this.switch1.push(false)
|
|
|
})
|
|
|
},
|
|
|
skip (index) {
|
|
|
@@ -256,7 +277,7 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
}
|
|
|
- margin-top: 38px;
|
|
|
+ margin-top: 18px;
|
|
|
border: 1px solid #ccc;
|
|
|
.title {
|
|
|
padding-left: 30px;
|