Merge pull request 'master' (#73) from master into test

Reviewed-on: http://git.feashow.cn/feashow/SmartOpsWeb/pulls/73
This commit is contained in:
springlog
2024-09-15 19:45:14 +00:00
3 changed files with 99 additions and 75 deletions

View File

@@ -6,10 +6,10 @@
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
import { reactive, shallowRef } from 'vue'; import { reactive, shallowRef } from 'vue';
import fvSelect from '@/fvcomponents/fvSelect/index.vue' import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import WorkDialog from '../components/WorkDialog.vue'; import WorkDialog from '../components/WorkDialog.vue';
import { orderdDetele, orderdClose} from "@/api/order/order.js" import { orderdDetele, orderdClose } from "@/api/order/order.js"
const rowData = ref() const rowData = ref()
const workDialogRef = ref() const workDialogRef = ref()
@@ -169,7 +169,7 @@ const tableConfig = reactive({
label: '处理人', label: '处理人',
align: 'center' align: 'center'
}, },
{ {
prop: 'processedContent', prop: 'processedContent',
label: '处理内容', label: '处理内容',
@@ -263,32 +263,40 @@ const handleDetail = (row) => {
} }
const handleClose = async (row) => { const handleClose = async (row) => {
console.log(row); if (row.orderState !== '2') {
ElMessageBox.confirm(
ElMessageBox.confirm( '确定要关单吗?',
'确定要关单吗?', '温馨提示',
'温馨提示', {
{ confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({
type: 'success',
message: '关闭成功',
})
})
.catch(() => {
// tableIns.value.refresh()
ElMessage({
type: 'info',
message: '关闭失败',
})
})
} else {
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
// if you want to disable its autofocus
// autofocus: false,
type:'warning',
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({
type: 'success',
message: '关闭成功',
})
})
.catch(() => {
// tableIns.value.refresh()
ElMessage({
type: 'info',
message: '关闭失败',
})
}) })
}
} }
const handleDelete = async (row) => { const handleDelete = async (row) => {

View File

@@ -265,32 +265,40 @@ const handleDetail = (row) => {
} }
const handleClose = async (row) => { const handleClose = async (row) => {
// console.log(row.orderNumber); if (row.orderState !== '2') {
ElMessageBox.confirm(
ElMessageBox.confirm( '确定要关单吗?',
'确定要关单吗?', '温馨提示',
'温馨提示', {
{ confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({
type: 'success',
message: '关闭成功',
})
})
.catch(() => {
// tableIns.value.refresh()
ElMessage({
type: 'info',
message: '关闭失败',
})
})
} else {
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
// if you want to disable its autofocus
// autofocus: false,
type:'warning',
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({
type: 'success',
message: '关闭成功',
})
})
.catch(() => {
// tableIns.value.refresh()
ElMessage({
type: 'info',
message: '关闭失败',
})
}) })
}
} }
const handleDelete = async (row) => { const handleDelete = async (row) => {

View File

@@ -265,32 +265,40 @@ const handleDetail = (row) => {
} }
const handleClose = async (row) => { const handleClose = async (row) => {
// console.log(row.orderNumber); if (row.orderState !== '2') {
ElMessageBox.confirm(
ElMessageBox.confirm( '确定要关单吗?',
'确定要关单吗?', '温馨提示',
'温馨提示', {
{ confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({
type: 'success',
message: '关闭成功',
})
})
.catch(() => {
// tableIns.value.refresh()
ElMessage({
type: 'info',
message: '关闭失败',
})
})
} else {
ElMessageBox.alert('此工单已被关闭!', '温馨提示', {
// if you want to disable its autofocus
// autofocus: false,
type:'warning',
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
await orderdClose(row.orderNumber)
tableIns.value.refresh()
ElMessage({
type: 'success',
message: '关闭成功',
})
})
.catch(() => {
// tableIns.value.refresh()
ElMessage({
type: 'info',
message: '关闭失败',
})
}) })
}
} }
const handleDelete = async (row) => { const handleDelete = async (row) => {