erp 新洋电子
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

106 lines
3.2 KiB

<template>
<view>
<view class="sm-box">
<!-- <view class="card">
<view class="title">:</view>
<view class="content">1.量化的需填写真实测量数据</view>
<view class="content">2.无量化检查项填写检查结果结果判定合格的填写OK不合格的填NG</view>
</view> -->
<view class="content-box-card">
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">物料名称:</view>
<text>{{ cyInfo.name }}</text>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">物料编号:</view>
<text>{{ cyInfo.number }}</text>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">提交日期:</view>
<text>{{ cyInfo.create_time }}</text>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">提交人员:</view>
<view class="lin-div">
<text>{{ cyInfo.staff }}</text>
</view>
</view>
</view>
<view class="content-box-card-ul-two">
<view class="content-box-card-list">
<view class="content-box-card-title">不良原因:</view>
<text>{{ cyInfo.no_reason }}</text>
</view>
</view>
</view>
</view>
<view>
<view class="add-img">
<image v-if="form.photos" :src="form.photos" class="crde-img" mode=""></image>
<image v-if="!form.photos" class="add-img" @tap="updateAvatar(2)" src="../../static/add.png"></image>
<view v-if="!form.photos" class="title">图片</view>
</view>
</view>
<view style="width: 100%;height: 250upx;background: white;padding-top: 1upx;">
<textarea style="width: 690upx;margin: auto;border: 2upx solid #999999;height: 200upx;margin-top: 25upx;" v-model="form.remake" placeholder="请输入备注"></textarea>
</view>
<view class="submit-btn"><button :disabled="buttonState==false?true:false" @tap="submit"
type="primary">审核</button></view>
</view>
</template>
<script>
import {upload,repairRecordExamine} from "../../api/user.js"
import uploads from "../../utils/uploads.js";
export default {
data() {
return {
host: "http://erp.ilechuan.com/",
cyInfo:{},
form:{
id:'',
photos:'',
remake:''
},
buttonState: true
};
},onLoad(e) {
this.cyInfo = JSON.parse(decodeURIComponent(e.planInfo));
},methods:{
updateAvatar(num) {
uploads().then(res => {
this.form.photos=this.host+res
console.log("图片",this.form.photos);
});
},
submit(){
this.form.id=this.cyInfo.id;
this.buttonState = false;
this.$functions.confirm("是否进行此操作?").then(() => {
repairRecordExamine(this.form
).then(res => {
this.$functions.success('提交成功').then(() => {
uni.navigateBack();
})
}).catch(res => {
this.buttonState = true;
});
}).catch(res => {
this.buttonState = true;
});
}
}
}
</script>
<style lang="scss">
@import "./index.scss"
</style>