Commit 1d3cd6dc by wuqian

Merge branch 'dev' of 47.122.114.111:qinjianhui/factory_front into wq

parents b5e9caca 3088a65d
...@@ -445,6 +445,27 @@ ...@@ -445,6 +445,27 @@
</el-icon> </el-icon>
</div> </div>
<div class="order-detail-item"> <div class="order-detail-item">
<span class="order-detail-item-label">物流跟踪号:</span>
<!-- <span
class="order-detail-item-value"
:title="row.trackingNumber"
>
{{ row.trackingNumber }}
</span> -->
<el-button
type="primary"
:title="row.trackingNumber"
link
:disabled="!row.expressSheet"
@click="downloadFacebook(row.expressSheet)"
>
{{ row.trackingNumber }}</el-button
>
<el-icon class="icon" @click="copy(row.trackingNumber || '')">
<DocumentCopy />
</el-icon>
</div>
<div class="order-detail-item">
<span class="order-detail-item-label">总克重:</span> <span class="order-detail-item-label">总克重:</span>
<span v-if="row.weight" class="order-detail-item-value"> <span v-if="row.weight" class="order-detail-item-value">
{{ row.weight }}g {{ row.weight }}g
...@@ -882,7 +903,7 @@ ...@@ -882,7 +903,7 @@
<ElOption <ElOption
v-for="(item, index) in productionClient" v-for="(item, index) in productionClient"
:key="index" :key="index"
:value="item.code" :value="item.code || ''"
:label="`${item.remark}(${item.code})`" :label="`${item.remark}(${item.code})`"
></ElOption> ></ElOption>
</ElSelect> </ElSelect>
...@@ -964,6 +985,56 @@ ...@@ -964,6 +985,56 @@
</el-button> </el-button>
</template> </template>
</el-dialog> </el-dialog>
<ElDialog
v-model="exceptionDialogVisible"
title="转为异常单"
width="500px"
:close-on-click-modal="false"
@open="handleExceptionDialogOpen"
>
<ElForm ref="exceptionFormRef" :model="exceptionForm" label-width="100px">
<!-- <ElFormItem
label="异常类型"
prop="exceptionType"
:rules="{ required: true, message: '请选择异常类型' }"
>
<ElSelect
v-model="exceptionForm.exceptionType"
style="width: 100%"
placeholder="请选择异常类型"
>
<ElOption
v-for="type in exceptionTypes"
:key="type.value"
:label="type.label"
:value="type.value"
/>
</ElSelect>
</ElFormItem> -->
<ElFormItem
label="异常原因"
prop="exceptionReason"
:rules="{ required: true, message: '请输入异常原因' }"
>
<ElInput
v-model="exceptionForm.exceptionReason"
style="width: 100%"
type="textarea"
:rows="3"
placeholder="请输入异常原因"
/>
</ElFormItem>
</ElForm>
<template #footer>
<span class="dialog-footer">
<ElButton @click="exceptionDialogVisible = false">取消</ElButton>
<ElButton type="primary" @click="handleExceptionConfirm">
确定
</ElButton>
</span>
</template>
</ElDialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { getUserMarkList } from '@/api/common' import { getUserMarkList } from '@/api/common'
...@@ -1290,6 +1361,9 @@ const handleProductionClientChange = async (v: string) => { ...@@ -1290,6 +1361,9 @@ const handleProductionClientChange = async (v: string) => {
} }
} }
} }
const downloadFacebook = async (row: string) => {
window.open(filePath + row, '_blank')
}
const confirm = async (row: ProductList) => { const confirm = async (row: ProductList) => {
confirmDialogShow.value = true confirmDialogShow.value = true
productionClientValue.value = '' productionClientValue.value = ''
...@@ -1498,35 +1572,62 @@ const pickingComplete = async () => { ...@@ -1498,35 +1572,62 @@ const pickingComplete = async () => {
loading.close() loading.close()
} }
} }
const exceptionType = ref('')
const exceptionReason = ref('')
// const exceptionTypes = [
// { value: '1', label: '客户' },
// { value: '2', label: '工厂' },
// ]
const exceptionDialogVisible = ref(false)
const currentOrderIds = ref<number[]>([])
const exceptionForm = ref({
exceptionType: '',
exceptionReason: '',
})
const exceptionFormRef = ref()
const changeExceptionOrder = async () => { const changeExceptionOrder = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const orderIds = selection.value.map((item) => item.id) currentOrderIds.value = selection.value.map((item) => item.id)
ElMessageBox.prompt('请填写异常原因', '提示', {
confirmButtonText: '确认', // 重置状态
cancelButtonText: '取消', exceptionType.value = ''
inputPattern: /^.{1,2000}$/, exceptionReason.value = ''
inputErrorMessage: '请输入异常原因', exceptionDialogVisible.value = true
}).then(async ({ value }) => { }
const handleExceptionConfirm = async () => {
try {
await exceptionFormRef.value.validate()
} catch {
return
}
const loading = ElLoading.service({ const loading = ElLoading.service({
fullscreen: true, fullscreen: true,
text: '操作中...', text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)', background: 'rgba(0, 0, 0, 0.3)',
}) })
try { try {
const res = await changeExceptionOrderApi(orderIds, value) const res = await changeExceptionOrderApi(
currentOrderIds.value,
// exceptionForm.value.exceptionType,
exceptionForm.value.exceptionReason,
)
if (res.code !== 200) return if (res.code !== 200) return
ElMessage.success('操作成功') ElMessage.success('操作成功')
search() search()
loadTabData() loadTabData()
exceptionDialogVisible.value = false
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally { } finally {
loading.close() loading.close()
} }
}) }
const handleExceptionDialogOpen = () => {
exceptionFormRef.value.resetFields()
} }
const cancelOrder = async () => { const cancelOrder = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment