|
|
@@ -113,10 +113,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="border-top: 1px solid #eee">
|
|
|
- <el-col :span="24" class="column">
|
|
|
+ <!-- <el-col :span="24" class="column">
|
|
|
<span class="label">维修方案:</span>
|
|
|
<span class="value">{{ item.maintenanceContent }}</span>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="8" class="column">
|
|
|
<span class="label">计划完成时间:</span>
|
|
|
<span class="value">{{ item.plannedTime }}</span>
|
|
|
@@ -189,221 +189,221 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import maintenancePlan from '@/api/maintenance/repair/maintenancePlan'
|
|
|
-// import { sendAudit } from '@/api/stockManagement/stocking'
|
|
|
-// import { imageView } from '@/utils'
|
|
|
-export default {
|
|
|
- data () {
|
|
|
- return {
|
|
|
- repairPlanDetailVisible: false,
|
|
|
- currentIndex: 0,
|
|
|
- detailsData: {},
|
|
|
- urgentObj: {
|
|
|
- 1: '普通',
|
|
|
- 2: '紧急',
|
|
|
- 3: '重要'
|
|
|
- },
|
|
|
- stautsObj: {
|
|
|
- 0: '待接收',
|
|
|
- 1: '执行中',
|
|
|
- 2: '待审核',
|
|
|
- 3: '完成',
|
|
|
- 4: '已撤回',
|
|
|
- 5: '已驳回'
|
|
|
- },
|
|
|
- cause: '',
|
|
|
- showtext: false,
|
|
|
- row: {}
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 请求详情数据
|
|
|
- async openDeatailDialog (row) {
|
|
|
- this.row = row
|
|
|
- this.repairPlanDetailVisible = true
|
|
|
- const res = await maintenancePlan.planInfoDetailApi(row.id)
|
|
|
- console.log('详情数据:', res)
|
|
|
- this.detailsData = res.data
|
|
|
- console.log('详情数据12:', this.detailsData.planDetailRespList)
|
|
|
+ // import maintenancePlan from '@/api/maintenance/repair/maintenancePlan'
|
|
|
+ // import { sendAudit } from '@/api/stockManagement/stocking'
|
|
|
+ // import { imageView } from '@/utils'
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ repairPlanDetailVisible: false,
|
|
|
+ currentIndex: 0,
|
|
|
+ detailsData: {},
|
|
|
+ urgentObj: {
|
|
|
+ 1: '普通',
|
|
|
+ 2: '紧急',
|
|
|
+ 3: '重要'
|
|
|
+ },
|
|
|
+ stautsObj: {
|
|
|
+ 0: '待接收',
|
|
|
+ 1: '执行中',
|
|
|
+ 2: '待审核',
|
|
|
+ 3: '完成',
|
|
|
+ 4: '已撤回',
|
|
|
+ 5: '已驳回'
|
|
|
+ },
|
|
|
+ cause: '',
|
|
|
+ showtext: false,
|
|
|
+ row: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 请求详情数据
|
|
|
+ async openDeatailDialog(row) {
|
|
|
+ this.row = row;
|
|
|
+ this.repairPlanDetailVisible = true;
|
|
|
+ const res = await maintenancePlan.planInfoDetailApi(row.id);
|
|
|
+ console.log('详情数据:', res);
|
|
|
+ this.detailsData = res.data;
|
|
|
+ console.log('详情数据12:', this.detailsData.planDetailRespList);
|
|
|
|
|
|
- this.detailsData.planDetailRespList.forEach(item => {
|
|
|
- // 处理图片
|
|
|
- if (item.repairsImg) {
|
|
|
- const repairsImg = item.repairsImg
|
|
|
- item.repairsImg = []
|
|
|
- repairsImg.split(',').map(itm => {
|
|
|
- imageView(itm).then(res => {
|
|
|
- item.repairsImg.push({
|
|
|
- name: itm.substring('/download/'.length),
|
|
|
- url: res
|
|
|
- })
|
|
|
- })
|
|
|
+ this.detailsData.planDetailRespList.forEach((item) => {
|
|
|
+ // 处理图片
|
|
|
+ if (item.repairsImg) {
|
|
|
+ const repairsImg = item.repairsImg;
|
|
|
+ item.repairsImg = [];
|
|
|
+ repairsImg.split(',').map((itm) => {
|
|
|
+ imageView(itm).then((res) => {
|
|
|
+ item.repairsImg.push({
|
|
|
+ name: itm.substring('/download/'.length),
|
|
|
+ url: res
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
- return
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- handleClose () {
|
|
|
- this.repairPlanDetailVisible = false
|
|
|
- },
|
|
|
- handleRotate (index) {
|
|
|
- this.currentIndex = index
|
|
|
- },
|
|
|
- //通过按钮事件
|
|
|
- pass () {
|
|
|
- let params = {
|
|
|
- id: this.row.id,
|
|
|
- checked: true,
|
|
|
- myHandleId: this.row.dbid,
|
|
|
- handleType: 0,
|
|
|
- type: 1,
|
|
|
- cause: ''
|
|
|
- }
|
|
|
- sendAudit(params).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.$message.success('审批通过!')
|
|
|
- this.$emit('refeshone')
|
|
|
- this.repairPlanDetailVisible = false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //驳回按钮事件
|
|
|
- reject () {
|
|
|
- this.showtext = true
|
|
|
- },
|
|
|
- cancelreject () {
|
|
|
- this.showtext = false
|
|
|
- this.cause = ''
|
|
|
- },
|
|
|
- surereject () {
|
|
|
- if (!this.cause) {
|
|
|
- this.$message.info('请填写驳回原因!')
|
|
|
- } else {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.repairPlanDetailVisible = false;
|
|
|
+ },
|
|
|
+ handleRotate(index) {
|
|
|
+ this.currentIndex = index;
|
|
|
+ },
|
|
|
+ //通过按钮事件
|
|
|
+ pass() {
|
|
|
let params = {
|
|
|
id: this.row.id,
|
|
|
- checked: false,
|
|
|
+ checked: true,
|
|
|
myHandleId: this.row.dbid,
|
|
|
handleType: 0,
|
|
|
type: 1,
|
|
|
- cause: this.cause
|
|
|
- }
|
|
|
- sendAudit(params).then(res => {
|
|
|
+ cause: ''
|
|
|
+ };
|
|
|
+ sendAudit(params).then((res) => {
|
|
|
if (res.success) {
|
|
|
- this.$message.success('审批驳回!')
|
|
|
- this.$emit('refeshone')
|
|
|
- this.repairPlanDetailVisible = false
|
|
|
+ this.$message.success('审批通过!');
|
|
|
+ this.$emit('refeshone');
|
|
|
+ this.repairPlanDetailVisible = false;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //驳回按钮事件
|
|
|
+ reject() {
|
|
|
+ this.showtext = true;
|
|
|
+ },
|
|
|
+ cancelreject() {
|
|
|
+ this.showtext = false;
|
|
|
+ this.cause = '';
|
|
|
+ },
|
|
|
+ surereject() {
|
|
|
+ if (!this.cause) {
|
|
|
+ this.$message.info('请填写驳回原因!');
|
|
|
+ } else {
|
|
|
+ let params = {
|
|
|
+ id: this.row.id,
|
|
|
+ checked: false,
|
|
|
+ myHandleId: this.row.dbid,
|
|
|
+ handleType: 0,
|
|
|
+ type: 1,
|
|
|
+ cause: this.cause
|
|
|
+ };
|
|
|
+ sendAudit(params).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('审批驳回!');
|
|
|
+ this.$emit('refeshone');
|
|
|
+ this.repairPlanDetailVisible = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- repairPlanDetailVisible (nVal, oVal) {
|
|
|
- if (!nVal) {
|
|
|
- this.cause = ''
|
|
|
- this.showtext = false
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ repairPlanDetailVisible(nVal, oVal) {
|
|
|
+ if (!nVal) {
|
|
|
+ this.cause = '';
|
|
|
+ this.showtext = false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-}
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-::v-deep .el-dialog__body {
|
|
|
- padding-top: 10px;
|
|
|
-}
|
|
|
-.info_wrapper {
|
|
|
- background-color: #f7f7f7;
|
|
|
- padding-top: 20px;
|
|
|
- .info_column {
|
|
|
- display: flex;
|
|
|
- margin-bottom: 20px;
|
|
|
- .label {
|
|
|
- width: 100px;
|
|
|
- text-align: right;
|
|
|
- margin-right: 5px;
|
|
|
- font-weight: 700;
|
|
|
- }
|
|
|
+ ::v-deep .el-dialog__body {
|
|
|
+ padding-top: 10px;
|
|
|
}
|
|
|
-}
|
|
|
-.main_info {
|
|
|
- margin: 20px 20px 0;
|
|
|
- .main_info_title {
|
|
|
- background-color: #bdcea3;
|
|
|
- color: #000;
|
|
|
- .main_info_column {
|
|
|
+ .info_wrapper {
|
|
|
+ background-color: #f7f7f7;
|
|
|
+ padding-top: 20px;
|
|
|
+ .info_column {
|
|
|
display: flex;
|
|
|
- border-right: 1px solid #fff;
|
|
|
- box-sizing: border-box;
|
|
|
- position: relative;
|
|
|
+ margin-bottom: 20px;
|
|
|
.label {
|
|
|
- padding: 5px 0;
|
|
|
- font-weight: 700;
|
|
|
- margin-right: 5px;
|
|
|
- width: 120px;
|
|
|
+ width: 100px;
|
|
|
text-align: right;
|
|
|
- }
|
|
|
- .value {
|
|
|
- padding: 5px 0;
|
|
|
- }
|
|
|
- .arrow_icon {
|
|
|
- font-size: 26px;
|
|
|
+ margin-right: 5px;
|
|
|
font-weight: 700;
|
|
|
- color: #fff;
|
|
|
- transform: rotate(90deg);
|
|
|
- position: absolute;
|
|
|
- right: 5px;
|
|
|
- top: 0;
|
|
|
- cursor: pointer;
|
|
|
- &:hover {
|
|
|
- color: #4b7902;
|
|
|
- }
|
|
|
- }
|
|
|
- .rotate90 {
|
|
|
- transform: rotate(270deg);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .transition_container {
|
|
|
- border: 1px solid #eee;
|
|
|
- .column {
|
|
|
- border-right: 1px solid #eee;
|
|
|
- border-bottom: 1px solid #eee;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
- .label {
|
|
|
- padding: 5px 0;
|
|
|
- background-color: #f2f2f2;
|
|
|
- font-weight: 700;
|
|
|
- margin-right: 5px;
|
|
|
- width: 120px;
|
|
|
- text-align: right;
|
|
|
+ .main_info {
|
|
|
+ margin: 20px 20px 0;
|
|
|
+ .main_info_title {
|
|
|
+ background-color: #bdcea3;
|
|
|
+ color: #000;
|
|
|
+ .main_info_column {
|
|
|
+ display: flex;
|
|
|
+ border-right: 1px solid #fff;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ .label {
|
|
|
+ padding: 5px 0;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-right: 5px;
|
|
|
+ width: 120px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .value {
|
|
|
+ padding: 5px 0;
|
|
|
+ }
|
|
|
+ .arrow_icon {
|
|
|
+ font-size: 26px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #fff;
|
|
|
+ transform: rotate(90deg);
|
|
|
+ position: absolute;
|
|
|
+ right: 5px;
|
|
|
+ top: 0;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ color: #4b7902;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .rotate90 {
|
|
|
+ transform: rotate(270deg);
|
|
|
+ }
|
|
|
}
|
|
|
- .value {
|
|
|
- padding: 5px 0;
|
|
|
+ }
|
|
|
+ .transition_container {
|
|
|
+ border: 1px solid #eee;
|
|
|
+ .column {
|
|
|
+ border-right: 1px solid #eee;
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ .label {
|
|
|
+ padding: 5px 0;
|
|
|
+ background-color: #f2f2f2;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-right: 5px;
|
|
|
+ width: 120px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .value {
|
|
|
+ padding: 5px 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-.dialog_footer {
|
|
|
- text-align: right;
|
|
|
-}
|
|
|
-.btnbox {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin-top: 10px;
|
|
|
-}
|
|
|
-::v-deep .el-button {
|
|
|
- padding: 10px 20px;
|
|
|
- margin-right: 10px;
|
|
|
-}
|
|
|
-.textbox {
|
|
|
- margin-top: 10px;
|
|
|
-}
|
|
|
-.textbtnbox {
|
|
|
- margin-top: 10px;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
+ .dialog_footer {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ .btnbox {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ ::v-deep .el-button {
|
|
|
+ padding: 10px 20px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ .textbox {
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .textbtnbox {
|
|
|
+ margin-top: 10px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
</style>
|