|
@@ -164,13 +164,22 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
slots: {
|
|
slots: {
|
|
|
default: (data: any) => {
|
|
default: (data: any) => {
|
|
|
const row = data.row;
|
|
const row = data.row;
|
|
|
- return (
|
|
|
|
|
- <>
|
|
|
|
|
- <ElButton type="primary" link size="small" onClick={() => action('edit', row)}>详情</ElButton>
|
|
|
|
|
- <ElDivider direction="vertical" />
|
|
|
|
|
- <ElButton type="primary" link size="small">详情</ElButton>
|
|
|
|
|
- </>
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ if(row.add_item.length > 0 && row.add_item[0].status == 0) {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <ElButton type="primary" link size="small" onClick={() => action('edit', row)}>详情</ElButton>
|
|
|
|
|
+ <ElDivider direction="vertical" />
|
|
|
|
|
+ <ElButton type="primary" link size="small" onClick={() => action('auth', row)}>审核增项</ElButton>
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
|
|
+ }else {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <ElButton type="primary" link size="small" onClick={() => action('edit', row)}>详情</ElButton>
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -267,6 +276,8 @@ const tabsConfig = reactive([
|
|
|
])
|
|
])
|
|
|
const activeNames = ref(0)
|
|
const activeNames = ref(0)
|
|
|
const currentRow = ref()
|
|
const currentRow = ref()
|
|
|
|
|
+const isEdit = ref(false)
|
|
|
|
|
+const isAuth = ref(false)
|
|
|
const tabsConfigs = reactive([
|
|
const tabsConfigs = reactive([
|
|
|
{
|
|
{
|
|
|
title: '基本信息',
|
|
title: '基本信息',
|
|
@@ -288,9 +299,27 @@ const getLists = (e)=> {
|
|
|
console.log(e)
|
|
console.log(e)
|
|
|
}
|
|
}
|
|
|
const checkedSalesperson = (e) => {
|
|
const checkedSalesperson = (e) => {
|
|
|
- console.log(e)
|
|
|
|
|
- currentRow.value.salesperson_id = e.id;
|
|
|
|
|
- currentRow.value.salesperson = e
|
|
|
|
|
|
|
+ console.log(e,'x',e.value)
|
|
|
|
|
+ currentRow.value.salesperson_id = e.value.id;
|
|
|
|
|
+ currentRow.value.salesperson = e.value
|
|
|
|
|
+ getList()
|
|
|
|
|
+}
|
|
|
|
|
+const checkedDesigner = (e) => {
|
|
|
|
|
+ console.log(e,'x',e.value)
|
|
|
|
|
+ currentRow.value.designer_id = e.value.id;
|
|
|
|
|
+ currentRow.value.designer = e.value
|
|
|
|
|
+ getList()
|
|
|
|
|
+}
|
|
|
|
|
+const checkedWorker = (e) => {
|
|
|
|
|
+ console.log(e,'x',e.value)
|
|
|
|
|
+ currentRow.value.worker_id = e.value.id;
|
|
|
|
|
+ currentRow.value.worker = e.value
|
|
|
|
|
+ getList()
|
|
|
|
|
+}
|
|
|
|
|
+const passAddItem = () => {
|
|
|
|
|
+ isAuth.value = false
|
|
|
|
|
+ // currentRow.value.add_item[0].status = 1
|
|
|
|
|
+ getList()
|
|
|
}
|
|
}
|
|
|
const action = async (type: string, row?: any) => {
|
|
const action = async (type: string, row?: any) => {
|
|
|
// actionType.value = type
|
|
// actionType.value = type
|
|
@@ -301,12 +330,18 @@ const action = async (type: string, row?: any) => {
|
|
|
|
|
|
|
|
// console.log(currentRow, 'currentRow')
|
|
// console.log(currentRow, 'currentRow')
|
|
|
// }
|
|
// }
|
|
|
- const res = await getOrderDetail(row.id)
|
|
|
|
|
- if (type == 'edit') {
|
|
|
|
|
- dialogTitle.value = '详情'
|
|
|
|
|
- currentRow.value = res.data
|
|
|
|
|
- console.log(row,'row');
|
|
|
|
|
- dialogVisible.value = true
|
|
|
|
|
|
|
+ const res = await getOrderDetail(row.id)
|
|
|
|
|
+ if(type == 'edit') {
|
|
|
|
|
+ isEdit.value = true
|
|
|
|
|
+ dialogTitle.value = '详情'
|
|
|
|
|
+ currentRow.value = res.data
|
|
|
|
|
+ dialogVisible.value = true
|
|
|
|
|
+ }else if(type == 'auth') {
|
|
|
|
|
+ isAuth.value = true
|
|
|
|
|
+ activeNames.value = 2
|
|
|
|
|
+ dialogTitle.value = '详情'
|
|
|
|
|
+ currentRow.value = res.data
|
|
|
|
|
+ dialogVisible.value = true
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// const goAssignSalesman = async (id:number, data: any) => {
|
|
// const goAssignSalesman = async (id:number, data: any) => {
|
|
@@ -346,10 +381,17 @@ const action = async (type: string, row?: any) => {
|
|
|
|
|
|
|
|
<ElDrawer
|
|
<ElDrawer
|
|
|
v-model="dialogVisible"
|
|
v-model="dialogVisible"
|
|
|
- :title="dialogTitle"
|
|
|
|
|
direction="rtl"
|
|
direction="rtl"
|
|
|
size="50%"
|
|
size="50%"
|
|
|
>
|
|
>
|
|
|
|
|
+ <!-- // :title="dialogTitle" -->
|
|
|
|
|
+ <template #header="{ titleId, titleClass }">
|
|
|
|
|
+ <h4 :id="titleId" :class="titleClass">{{dialogTitle}}</h4>
|
|
|
|
|
+ <!-- <el-button type="danger" @click="close">
|
|
|
|
|
+ <el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
|
|
|
|
+ Close
|
|
|
|
|
+ </el-button> -->
|
|
|
|
|
+ </template>
|
|
|
<ElTabs v-model="activeNames" >
|
|
<ElTabs v-model="activeNames" >
|
|
|
<ElTabPane
|
|
<ElTabPane
|
|
|
v-for="(item, index) in tabsConfigs"
|
|
v-for="(item, index) in tabsConfigs"
|
|
@@ -358,8 +400,8 @@ const action = async (type: string, row?: any) => {
|
|
|
:name="index"
|
|
:name="index"
|
|
|
/>
|
|
/>
|
|
|
</ElTabs>
|
|
</ElTabs>
|
|
|
- <Detail v-if="activeNames === 0" :current-row="currentRow" @checkedSalesperson="checkedSalesperson"/>
|
|
|
|
|
|
|
+ <Detail v-if="activeNames === 0" :current-row="currentRow" :isEdit="isEdit" @checkedSalesperson="checkedSalesperson" @checkedDesigner="checkedDesigner"/>
|
|
|
<Draft v-if="activeNames === 1" :current-row="currentRow" />
|
|
<Draft v-if="activeNames === 1" :current-row="currentRow" />
|
|
|
- <addItem v-if="activeNames === 2" :current-row="currentRow" />
|
|
|
|
|
|
|
+ <addItem v-if="activeNames === 2" :current-row="currentRow" :isAuth="isAuth" @passAddItem="passAddItem"/>
|
|
|
</ElDrawer>
|
|
</ElDrawer>
|
|
|
</template>
|
|
</template>
|