|
@@ -1,41 +1,61 @@
|
|
|
<template>
|
|
|
- <el-dialog id="workdialog" v-model="outerVisible" title="Outer Dialog" width="800">
|
|
|
- <el-table
|
|
|
- ref="singleTableRef"
|
|
|
- :data="gridData"
|
|
|
+ <el-dialog id="workdialog" v-model="outerVisible" title="合同列表" width="800">
|
|
|
+ <span>导入的合同开始时间大于当前时间 <br/>
|
|
|
+ 注:当前导入的以下合同,其最小开始月大于当前时间,会在开始月之前无法将任务委托给工厂进行工作,请确认以下客户开始服务的时间是否正确。</span>
|
|
|
+ <el-table
|
|
|
+ ref="singleTableRef"
|
|
|
+ :data="data.startMonth"
|
|
|
+ highlight-current-row
|
|
|
+ style="width: 100%"
|
|
|
+ max-height="250"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="序号" width="50" />
|
|
|
+ <el-table-column property="contractNo" label="合同编号" width="120" />
|
|
|
+ <el-table-column property="companyName" label="客户名称" width="120" />
|
|
|
+
|
|
|
+ <el-table-column property="taskType" label="服务类型" width="120" />
|
|
|
+ <el-table-column property="startMonth" label="开始月" width="120" />
|
|
|
+ <el-table-column property="endMonth" label="结束月" width="120" />
|
|
|
+ <el-table-column label="操作" min-width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button size="small" :disabled="scope.row.disabled" @click="handleClick(scope.$index, scope.row,this)">
|
|
|
+ 确认
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <span>导入的合同结束时间小于当前时间 <br/>
|
|
|
+ 注:当前导入的以下合同,其最大结束月小于当前时间,会导致洪喜爱月开始该服务将无法委托给工厂工作,请确认一下客户是否都已经停止服务,如果未停止服务,需要补传续合同。</span>
|
|
|
+ <el-table
|
|
|
+
|
|
|
+ :data="data.endMonth"
|
|
|
highlight-current-row
|
|
|
style="width: 100%"
|
|
|
+ max-height="250"
|
|
|
@current-change="handleCurrentChange"
|
|
|
>
|
|
|
- <el-table-column type="index" width="50" />
|
|
|
- <el-table-column property="date" label="Date" width="120" />
|
|
|
- <el-table-column property="name" label="Name" width="120" />
|
|
|
- <el-table-column property="address" label="Address" />
|
|
|
- </el-table>
|
|
|
- <div style="margin-top: 20px">
|
|
|
- <el-button @click="setCurrent(gridData[1])">Select second row</el-button>
|
|
|
- <el-button @click="setCurrent()">Clear selection</el-button>
|
|
|
- </div>
|
|
|
- <el-dialog
|
|
|
- v-model="innerVisible"
|
|
|
- title="Inner Dialog"
|
|
|
- width="400px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <span>确定要更换这条工单详细吗?</span>
|
|
|
- <template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button @click="innerVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="sumbit">
|
|
|
- 提交
|
|
|
+ <el-table-column type="index" label="序号" width="50" />
|
|
|
+ <el-table-column property="contractNo" label="合同编号" width="120" />
|
|
|
+ <el-table-column property="companyName" label="客户名称" width="120" />
|
|
|
+
|
|
|
+ <el-table-column property="taskType" label="服务类型" width="120" />
|
|
|
+ <el-table-column property="startMonth" label="开始月" width="120" />
|
|
|
+ <el-table-column property="endMonth" label="结束月" width="120" />
|
|
|
+ <el-table-column label="操作" min-width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button size="small" :disabled="scope.row.disabled" @click="handleClick(scope.$index, scope.row,this)">
|
|
|
+ 确认
|
|
|
</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-dialog>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="outerVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="innerVisible = true">
|
|
|
+ <el-button type="primary" @click="sumbit">
|
|
|
确认
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -43,8 +63,10 @@
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
-import { reactive, ref } from 'vue'
|
|
|
-import {ElTable} from "element-plus";
|
|
|
+import {getCurrentInstance, reactive, ref, toRefs} from 'vue'
|
|
|
+import {ElTable,ElButton} from "element-plus";
|
|
|
+
|
|
|
+import { defineProps,defineEmits } from 'vue';
|
|
|
|
|
|
const dialogTableVisible = ref(false)
|
|
|
const dialogFormVisible = ref(false)
|
|
@@ -52,6 +74,9 @@ const formLabelWidth = '140px'
|
|
|
const outerVisible = ref(false);
|
|
|
const innerVisible = ref(false);
|
|
|
const currentRow = ref();
|
|
|
+
|
|
|
+const checkNumber = ref(0);
|
|
|
+const { proxy } = getCurrentInstance();
|
|
|
const form = reactive({
|
|
|
name: '',
|
|
|
region: '',
|
|
@@ -62,41 +87,69 @@ const form = reactive({
|
|
|
resource: '',
|
|
|
desc: '',
|
|
|
})
|
|
|
-interface workOrder {
|
|
|
-
|
|
|
+// interface Props {
|
|
|
+// inputData?:Map<string, any>
|
|
|
+// }
|
|
|
+// const prop = defineProps<Props>()
|
|
|
+interface input {
|
|
|
+ contractNo:string;
|
|
|
+ companyName:string;
|
|
|
+ taskType:string;
|
|
|
+ startMonth:Date;
|
|
|
+ endMonth:Date;
|
|
|
+ disabled: boolean;
|
|
|
}
|
|
|
-const gridData = [
|
|
|
- {
|
|
|
- date: '2016-05-02',
|
|
|
- name: 'John Smith',
|
|
|
- address: 'No.1518, Jinshajiang Road, Putuo District',
|
|
|
- },
|
|
|
- {
|
|
|
- date: '2016-05-04',
|
|
|
- name: 'John Smith',
|
|
|
- address: 'No.1518, Jinshajiang Road, Putuo District',
|
|
|
- },
|
|
|
- {
|
|
|
- date: '2016-05-01',
|
|
|
- name: 'John Smith',
|
|
|
- address: 'No.1518, Jinshajiang Road, Putuo District',
|
|
|
+const emit = defineEmits(['event']);
|
|
|
+const props = defineProps({
|
|
|
+ data: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {},
|
|
|
},
|
|
|
- {
|
|
|
- date: '2016-05-03',
|
|
|
- name: 'John Smith',
|
|
|
- address: 'No.1518, Jinshajiang Road, Putuo District',
|
|
|
- },
|
|
|
-]
|
|
|
+ checksuccess:{
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ }
|
|
|
+});
|
|
|
+const { data,checksuccess } = toRefs(props);
|
|
|
+//torefs()
|
|
|
+
|
|
|
|
|
|
function open() {
|
|
|
outerVisible.value = true;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
function sumbit() {
|
|
|
- outerVisible.value = false;
|
|
|
- innerVisible.value = false;
|
|
|
+
|
|
|
+
|
|
|
+ if(data.value.startMonth == null && data.value.endMonth == null ){
|
|
|
+ emit('event',1)
|
|
|
+ outerVisible.value = false;
|
|
|
+ }
|
|
|
+ if(data.value.startMonth == 0 && data.value.endMonth == 0){
|
|
|
+ emit('event',1)
|
|
|
+ outerVisible.value = false;
|
|
|
+ }
|
|
|
+ if(data.value.startMonth.length+data.value.endMonth.length===checkNumber.value){
|
|
|
+ emit('event',1)
|
|
|
+ proxy.$alert(
|
|
|
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
+ "已完成确认请重新上传文件" +
|
|
|
+ "</div>"
|
|
|
+ ,
|
|
|
+ { dangerouslyUseHTMLString: true }
|
|
|
+ );
|
|
|
+ outerVisible.value = false;
|
|
|
+ }else{
|
|
|
+ proxy.$alert(
|
|
|
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
|
+ "还有未确认数据" +
|
|
|
+ "</div>"
|
|
|
+ ,
|
|
|
+ { dangerouslyUseHTMLString: true }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ checkNumber.value = 0;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -108,9 +161,15 @@ const setCurrent = (row?: any) => {
|
|
|
const handleCurrentChange = (val: any | undefined) => {
|
|
|
currentRow.value = val
|
|
|
}
|
|
|
+const handleClick =(index:number ,row:input,ele:ElButton) => {
|
|
|
+ checkNumber.value = checkNumber.value+1;
|
|
|
+ row.disabled = true;
|
|
|
+
|
|
|
+}
|
|
|
defineExpose({
|
|
|
open,
|
|
|
});
|
|
|
+
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
#workdialog{
|