优化
This commit is contained in:
@ -7,14 +7,12 @@
|
||||
<el-form-item label="采购单编号" prop="docCode">
|
||||
<el-input v-model="queryParams.docCode" placeholder="请输入采购单编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备统称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入设备统称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="到货日期" prop="arrivalDate">
|
||||
<el-date-picker clearable v-model="queryParams.arrivalDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择到货日期" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@ -23,45 +21,35 @@
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['cailiaoshebei:purchaseDoc:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="purchaseDocList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="采购单编号" align="center" prop="docCode" width="90" />
|
||||
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||
<el-table-column label="批次号" align="center" prop="planCode" width="120" />
|
||||
<el-table-column label="采购单编号" align="center" prop="docCode" width="160" />
|
||||
<el-table-column label="供应商" align="center" prop="supplier" />
|
||||
<!-- <el-table-column label="事由" align="center" prop="reason" /> -->
|
||||
<el-table-column label="设备统称" align="center" prop="name" />
|
||||
<el-table-column label="到货日期" align="center" prop="arrivalDate" width="180">
|
||||
<el-table-column label="到货日期" align="center" prop="arrivalDate" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.arrivalDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="负责人联系方式" align="center" prop="designDirectorTel" width="130" />
|
||||
<el-table-column label="现场联系方式" align="center" prop="technicalDirectorTel" width="130" /> -->
|
||||
<el-table-column label="收货地址" align="center" prop="receivingAddress" />
|
||||
<el-table-column label="联系人" align="center" prop="contacts" />
|
||||
<!-- <el-table-column label="项目负责人" align="center" prop="projectDirector" width="90" /> -->
|
||||
<el-table-column label="物流单" align="center" prop="remark" width="150">
|
||||
<el-table-column label="物流单号" align="center" prop="remark" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['out:monthPlan:remove']">查看物流单</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购经办人" align="center" prop="purchasingAgent" width="90" />
|
||||
<el-table-column label="日期" align="center" prop="preparedDate" width="180">
|
||||
<el-table-column label="日期" align="center" prop="preparedDate" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.preparedDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
@ -71,7 +59,6 @@
|
||||
<el-link :href="scope.row.feedbackUrl" target="_blank" type="primary" v-if="scope.row.feedbackUrl">回单</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="审核状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="wf_business_status" :value="scope.row.status"></dict-tag>
|
||||
@ -79,10 +66,33 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="160">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Finished" @click="handleAudit(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-if="scope.row.status == 'draft' || scope.row.status == 'back'"
|
||||
icon="Finished"
|
||||
@click="handleAudit(scope.row)"
|
||||
v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||
>
|
||||
审核</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Upload" @click="handleUpload(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-if="scope.row.status != 'draft'"
|
||||
icon="view"
|
||||
@click="handleViewDetail(scope.row)"
|
||||
v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||
>
|
||||
查看</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
v-if="!scope.row.feedbackUrl && scope.row.status == 'finish'"
|
||||
icon="Upload"
|
||||
@click="handleUpload(scope.row)"
|
||||
v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||
>上传</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -106,7 +116,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
<!-- 添加或修改物资-采购联系单对话框 -->
|
||||
@ -118,7 +127,6 @@
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0"
|
||||
><el-form-item label="供应商" prop="supplier">
|
||||
<!-- <el-input v-model="form.supplier" placeholder="请输入供应商" /> -->
|
||||
<el-select v-model="form.supplier" value-key="id" placeholder="请选择供应商" clearable filterable @change="">
|
||||
<el-option v-for="item in supplierOptions" :key="item.id" :label="item.name" :value="item.name"> </el-option>
|
||||
</el-select> </el-form-item
|
||||
@ -148,11 +156,11 @@
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0"
|
||||
><el-form-item label="负责人联系方式" prop="designDirectorTel">
|
||||
<el-input v-model="form.designDirectorTel" placeholder="请输入设计负责人联系方式" type="number" /> </el-form-item
|
||||
<el-input v-model="form.designDirectorTel" placeholder="请输入设计负责人联系方式" /> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0"
|
||||
><el-form-item label="现场联系方式" prop="technicalDirectorTel">
|
||||
<el-input v-model="form.technicalDirectorTel" placeholder="请输入现场技术负责人联系方式" type="number" /> </el-form-item
|
||||
<el-input v-model="form.technicalDirectorTel" placeholder="请输入现场技术负责人联系方式" /> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="收货地址" prop="receivingAddress">
|
||||
@ -169,11 +177,11 @@
|
||||
><el-form-item label="采购经办人" prop="purchasingAgent">
|
||||
<el-input v-model="form.purchasingAgent" placeholder="请输入采购经办人" /> </el-form-item
|
||||
></el-col>
|
||||
<el-col :span="12" :offset="0"
|
||||
<!-- <el-col :span="12" :offset="0"
|
||||
><el-form-item label="日期" prop="preparedDate">
|
||||
<el-date-picker clearable v-model="form.preparedDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择日期">
|
||||
</el-date-picker> </el-form-item
|
||||
></el-col>
|
||||
></el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="selectPlanList" v-if="form.id">
|
||||
@ -251,7 +259,7 @@ const total = ref(0);
|
||||
const feedbackUrl = ref('');
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const purchaseDocFormRef = ref<ElFormInstance>();
|
||||
const IP = 'http://192.168.110.142:7788';
|
||||
const IP = 'http://192.168.110.151:7788';
|
||||
|
||||
const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
@ -275,7 +283,6 @@ const initFormData: any = {
|
||||
receivingAddress: undefined,
|
||||
contacts: undefined,
|
||||
associationList: [],
|
||||
|
||||
projectDirector: undefined,
|
||||
purchasingAgent: undefined,
|
||||
preparedDate: undefined,
|
||||
@ -312,7 +319,16 @@ const data = reactive({
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }]
|
||||
id: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
|
||||
// 电话号码验证
|
||||
technicalDirectorTel: [
|
||||
{ required: true, message: '请输入电话', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
|
||||
],
|
||||
designDirectorTel: [
|
||||
{ required: true, message: '请输入电话', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
@ -356,7 +372,7 @@ const fileList = ref([]);
|
||||
const viewVisible = ref(false);
|
||||
const handleView = async (row?: any) => {
|
||||
const res = await listLink({
|
||||
id: row.id
|
||||
docId: row.id
|
||||
});
|
||||
fileList.value = res.rows;
|
||||
|
||||
@ -448,7 +464,7 @@ const getSupplierList = async () => {
|
||||
supplierOptions.value = res.rows;
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
/** 分享按钮操作 */
|
||||
const handleShare = async (row?: PurchaseDocVO) => {
|
||||
const textarea = document.createElement('textarea');
|
||||
const data = JSON.stringify({
|
||||
@ -457,8 +473,10 @@ const handleShare = async (row?: PurchaseDocVO) => {
|
||||
projectId: currentProject.value?.id,
|
||||
token: 'Bearer ' + getToken()
|
||||
});
|
||||
// 获取当前域名地址
|
||||
console.log(location);
|
||||
textarea.value = IP + '/materials/purchaseDoc/uploadCode?data=' + data;
|
||||
|
||||
// textarea.value = location.host + '/materials/purchaseDoc/uploadCode?data=' + data;
|
||||
textarea.style.position = 'fixed';
|
||||
textarea.style.opacity = '0';
|
||||
document.body.appendChild(textarea);
|
||||
@ -499,6 +517,14 @@ const handleAudit = async (row?: PurchaseDocVO) => {
|
||||
type: 'update'
|
||||
});
|
||||
};
|
||||
/** 审核按钮操作 */
|
||||
const handleViewDetail = async (row?: PurchaseDocVO) => {
|
||||
proxy?.$tab.closePage(route);
|
||||
proxy?.$tab.openPage('/materials/purchaseDoc/indexEdit', '审核采购联系单', {
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
Reference in New Issue
Block a user