|
@@ -5,24 +5,16 @@
|
|
<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
<el-form-item class="section-title" label="外协商管理" />
|
|
<el-form-item class="section-title" label="外协商管理" />
|
|
<el-form-item label="外协商名称:">
|
|
<el-form-item label="外协商名称:">
|
|
- <el-input
|
|
|
|
- placeholder="请输入关键字"
|
|
|
|
- v-model.trim="queryParams.name"
|
|
|
|
- style="width: 120px"
|
|
|
|
- clearable
|
|
|
|
- @keyup.enter="handleQuery"
|
|
|
|
- @keydown.enter.prevent
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input placeholder="请输入关键字" v-model.trim="queryParams.name" style="width: 120px" clearable
|
|
|
|
+ @keyup.enter="handleQuery" @keydown.enter.prevent />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="助记码:">
|
|
<el-form-item label="助记码:">
|
|
- <el-input
|
|
|
|
- placeholder="请输入关键字"
|
|
|
|
- v-model.trim="queryParams.mnemonicCode"
|
|
|
|
- style="width: 120px"
|
|
|
|
- clearable
|
|
|
|
- @keyup.enter="handleQuery"
|
|
|
|
- @keydown.enter.prevent
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input placeholder="请输入助记码" v-model.trim="queryParams.mnemonicCode" style="width: 120px" clearable
|
|
|
|
+ @keyup.enter="handleQuery" @keydown.enter.prevent />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="外协厂编码:">
|
|
|
|
+ <el-input placeholder="请输入外协厂编码" v-model.trim="queryParams.code" style="width: 120px" clearable
|
|
|
|
+ @keyup.enter="handleQuery" @keydown.enter.prevent />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="info" icon="Search" @click="handleQuery">搜索</el-button>
|
|
<el-button type="info" icon="Search" @click="handleQuery">搜索</el-button>
|
|
@@ -32,18 +24,11 @@
|
|
<!-- 列表区 -->
|
|
<!-- 列表区 -->
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
- <el-table
|
|
|
|
- ref="supplierTable"
|
|
|
|
- v-loading="loading"
|
|
|
|
- border
|
|
|
|
- :data="supplierList"
|
|
|
|
- highlight-current-row
|
|
|
|
- height="100%"
|
|
|
|
- @current-change="handleCurrentSupplierChange"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table ref="supplierTable" v-loading="loading" border :data="supplierList" highlight-current-row
|
|
|
|
+ height="100%" @current-change="handleCurrentSupplierChange">
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column label="外协商名称" width="320" align="center" prop="name" />
|
|
<el-table-column label="外协商名称" width="320" align="center" prop="name" />
|
|
- <el-table-column label="助记码" width="120" align="center" prop="mnemonicCode" />
|
|
|
|
|
|
+ <el-table-column label="外协厂编码" width="120" align="center" prop="code" />
|
|
<el-table-column label="发货方式" width="96" align="center" prop="deliveryMethod">
|
|
<el-table-column label="发货方式" width="96" align="center" prop="deliveryMethod">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<dict-tag :options="delivery_method" :value="scope.row.deliveryMethod" />
|
|
<dict-tag :options="delivery_method" :value="scope.row.deliveryMethod" />
|
|
@@ -58,44 +43,24 @@
|
|
<template #default="scope"> {{ scope.row.lossLimit }}% </template>
|
|
<template #default="scope"> {{ scope.row.lossLimit }}% </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="默认联系人" width="120" align="center" prop="contactName" />
|
|
<el-table-column label="默认联系人" width="120" align="center" prop="contactName" />
|
|
- <el-table-column label="默认联系电话" width="120" align="center" prop="contactPhoneNumber" />
|
|
|
|
|
|
+ <el-table-column label="默认联系电话" width="120" align="center" prop="contactPhoneNumber" />
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
<el-table-column label="操作" width="350" align="center">
|
|
<el-table-column label="操作" width="350" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button
|
|
|
|
- v-hasPermi="['business:supplier:edit']"
|
|
|
|
- link
|
|
|
|
- type="primary"
|
|
|
|
- icon="User"
|
|
|
|
- @click="handleSetSupplierAdmin(scope.row)"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button v-hasPermi="['business:supplier:edit']" link type="primary" icon="User"
|
|
|
|
+ @click="handleSetSupplierAdmin(scope.row)">
|
|
设置管理员
|
|
设置管理员
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button
|
|
|
|
- v-hasPermi="['business:supplier:edit']"
|
|
|
|
- link
|
|
|
|
- type="success"
|
|
|
|
- icon="Iphone"
|
|
|
|
- @click="handleSetSupplierContacts(scope.row)"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button v-hasPermi="['business:supplier:edit']" link type="success" icon="Iphone"
|
|
|
|
+ @click="handleSetSupplierContacts(scope.row)">
|
|
设置联系人
|
|
设置联系人
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button
|
|
|
|
- v-hasPermi="['business:supplier:edit']"
|
|
|
|
- link
|
|
|
|
- type="warning"
|
|
|
|
- icon="Edit"
|
|
|
|
- @click="handleShowSupplierDialog(scope.row)"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button v-hasPermi="['business:supplier:edit']" link type="warning" icon="Edit"
|
|
|
|
+ @click="handleShowSupplierDialog(scope.row)">
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button
|
|
|
|
- v-hasPermi="['business:supplier:remove']"
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- icon="Delete"
|
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button v-hasPermi="['business:supplier:remove']" link type="danger" icon="Delete"
|
|
|
|
+ @click="handleDelete(scope.row)">
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -105,13 +70,8 @@
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
- <pagination
|
|
|
|
- v-show="supplierTotal > 0"
|
|
|
|
- :total="supplierTotal"
|
|
|
|
- v-model:page="queryParams.pageNum"
|
|
|
|
- v-model:limit="queryParams.pageSize"
|
|
|
|
- @pagination="getList"
|
|
|
|
- />
|
|
|
|
|
|
+ <pagination v-show="supplierTotal > 0" :total="supplierTotal" v-model:page="queryParams.pageNum"
|
|
|
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
|
|
|
<section class="list-part-container row-container" style="flex: 1">
|
|
<section class="list-part-container row-container" style="flex: 1">
|
|
<section class="list-part-container" style="flex: 2">
|
|
<section class="list-part-container" style="flex: 2">
|
|
@@ -119,39 +79,22 @@
|
|
<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
|
|
<el-form-item class="section-title" label="产品" />
|
|
<el-form-item class="section-title" label="产品" />
|
|
<el-form-item label="产品描述:">
|
|
<el-form-item label="产品描述:">
|
|
- <el-input
|
|
|
|
- placeholder="请输入关键字"
|
|
|
|
- v-model.trim="queryProductParams.productDescription"
|
|
|
|
- style="width: 120px"
|
|
|
|
- clearable
|
|
|
|
- @keyup.enter="handleQuery"
|
|
|
|
- @keydown.enter.prevent
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input placeholder="请输入关键字" v-model.trim="queryProductParams.productDescription" style="width: 120px"
|
|
|
|
+ clearable @keyup.enter="handleQuery" @keydown.enter.prevent />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="info" icon="Search" @click="handleQueryProducts">搜索</el-button>
|
|
<el-button type="info" icon="Search" @click="handleQueryProducts">搜索</el-button>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="Plus"
|
|
|
|
- @click="handleShowProductsDialog(null)"
|
|
|
|
- :disabled="!currentSupplier.id"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" icon="Plus" @click="handleShowProductsDialog(null)"
|
|
|
|
+ :disabled="!currentSupplier.id">
|
|
添加产品
|
|
添加产品
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
- <el-table
|
|
|
|
- ref="productTable"
|
|
|
|
- :data="supplierProductList ? supplierProductList : []"
|
|
|
|
- v-loading="supplierProductLoading"
|
|
|
|
- highlight-current-row
|
|
|
|
- height="100%"
|
|
|
|
- size="small"
|
|
|
|
- header-row-class-name="list-header-row"
|
|
|
|
- @current-change="handleCurrentProductChange"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table ref="productTable" :data="supplierProductList ? supplierProductList : []"
|
|
|
|
+ v-loading="supplierProductLoading" highlight-current-row height="100%" size="small"
|
|
|
|
+ header-row-class-name="list-header-row" @current-change="handleCurrentProductChange">
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column label="料号" width="120" align="center" prop="productCode" />
|
|
<el-table-column label="料号" width="120" align="center" prop="productCode" />
|
|
<el-table-column label="产品描述" align="center" prop="productDescription" />
|
|
<el-table-column label="产品描述" align="center" prop="productDescription" />
|
|
@@ -164,38 +107,21 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
- <pagination
|
|
|
|
- v-show="productTotal > 0"
|
|
|
|
- :total="productTotal"
|
|
|
|
- v-model:page="queryProductParams.pageNum"
|
|
|
|
- v-model:limit="queryProductParams.pageSize"
|
|
|
|
- @pagination="getCurrentSupplierProduct"
|
|
|
|
- />
|
|
|
|
|
|
+ <pagination v-show="productTotal > 0" :total="productTotal" v-model:page="queryProductParams.pageNum"
|
|
|
|
+ v-model:limit="queryProductParams.pageSize" @pagination="getCurrentSupplierProduct" />
|
|
</section>
|
|
</section>
|
|
<section class="list-part-container" style="flex: 3">
|
|
<section class="list-part-container" style="flex: 3">
|
|
- <el-form
|
|
|
|
- class="list-search-container list-search-container-child"
|
|
|
|
- :model="queryParams"
|
|
|
|
- ref="queryRef"
|
|
|
|
- :inline="true"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form class="list-search-container list-search-container-child" :model="queryParams" ref="queryRef"
|
|
|
|
+ :inline="true">
|
|
<el-form-item class="section-title" label="外协工序" />
|
|
<el-form-item class="section-title" label="外协工序" />
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="Plus"
|
|
|
|
- @click="handleShowProcessesDialog"
|
|
|
|
- :disabled="!currentProduct.id || processEditStatus"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" icon="Plus" @click="handleShowProcessesDialog"
|
|
|
|
+ :disabled="!currentProduct.id || processEditStatus">
|
|
添加工序
|
|
添加工序
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button
|
|
|
|
- v-if="!processEditStatus"
|
|
|
|
- type="warning"
|
|
|
|
- icon="Edit"
|
|
|
|
|
|
+ <el-button v-if="!processEditStatus" type="warning" icon="Edit"
|
|
:disabled="!currentProduct.id || supplierProductProcessList.length === 0"
|
|
:disabled="!currentProduct.id || supplierProductProcessList.length === 0"
|
|
- @click="processEditStatus = true"
|
|
|
|
- >
|
|
|
|
|
|
+ @click="processEditStatus = true">
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
<template v-if="processEditStatus">
|
|
<template v-if="processEditStatus">
|
|
@@ -206,38 +132,24 @@
|
|
</el-form>
|
|
</el-form>
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
<div class="el-table-inner-container">
|
|
<div class="el-table-inner-container">
|
|
- <el-table
|
|
|
|
- :data="supplierProductProcessList"
|
|
|
|
- v-loading="supplierProductProcessLoading"
|
|
|
|
- highlight-current-row
|
|
|
|
- height="100%"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table :data="supplierProductProcessList" v-loading="supplierProductProcessLoading" highlight-current-row
|
|
|
|
+ height="100%">
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column type="index" label="行号" width="50" align="center" />
|
|
<el-table-column label="工序编码" width="120" align="center" prop="processCode" />
|
|
<el-table-column label="工序编码" width="120" align="center" prop="processCode" />
|
|
<el-table-column label="工序简称" width="120" align="center" prop="processAlias" />
|
|
<el-table-column label="工序简称" width="120" align="center" prop="processAlias" />
|
|
<el-table-column label="结算方式" width="120" align="center" prop="settlementType">
|
|
<el-table-column label="结算方式" width="120" align="center" prop="settlementType">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-select v-if="processEditStatus" v-model="scope.row.settlementType" clearable placeholder="请选择">
|
|
<el-select v-if="processEditStatus" v-model="scope.row.settlementType" clearable placeholder="请选择">
|
|
- <el-option
|
|
|
|
- v-for="dict in settlement_type"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-option v-for="dict in settlement_type" :key="dict.value" :label="dict.label"
|
|
|
|
+ :value="dict.value" />
|
|
</el-select>
|
|
</el-select>
|
|
<dict-tag v-else :options="settlement_type" :value="scope.row.settlementType" />
|
|
<dict-tag v-else :options="settlement_type" :value="scope.row.settlementType" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="单价(元)" width="120" align="center" prop="price">
|
|
<el-table-column label="单价(元)" width="120" align="center" prop="price">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input-number
|
|
|
|
- v-if="processEditStatus"
|
|
|
|
- v-model="scope.row.price"
|
|
|
|
- :precision="8"
|
|
|
|
- :min="0.0"
|
|
|
|
- :step="0.00000001"
|
|
|
|
- controls-position="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input-number v-if="processEditStatus" v-model="scope.row.price" :precision="8" :min="0.0"
|
|
|
|
+ :step="0.00000001" controls-position="right" />
|
|
<span v-else>{{ scope.row.priceLabel }}</span>
|
|
<span v-else>{{ scope.row.priceLabel }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -258,24 +170,17 @@
|
|
</section>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
<!-- 供应商表单 -->
|
|
<!-- 供应商表单 -->
|
|
- <dialog-form
|
|
|
|
- ref="formRef"
|
|
|
|
- @handleSaveSuccess="handleQuery"
|
|
|
|
- :delivery-method="delivery_method"
|
|
|
|
- :settlement-type="settlement_type"
|
|
|
|
- />
|
|
|
|
|
|
+ <dialog-form ref="formRef" @handleSaveSuccess="handleQuery" :delivery-method="delivery_method"
|
|
|
|
+ :settlement-type="settlement_type" />
|
|
<!-- 产品添加对话框 -->
|
|
<!-- 产品添加对话框 -->
|
|
<dialog-products ref="productsRef" :supplier-id="currentSupplier.id" :multiple-selected="handleProductSelected" />
|
|
<dialog-products ref="productsRef" :supplier-id="currentSupplier.id" :multiple-selected="handleProductSelected" />
|
|
<!-- 工序添加对话框 -->
|
|
<!-- 工序添加对话框 -->
|
|
- <dialog-processes
|
|
|
|
- ref="processesRef"
|
|
|
|
- :product-id="currentProduct.productId"
|
|
|
|
- :multiple-selected="handleProcessSelected"
|
|
|
|
- />
|
|
|
|
|
|
+ <dialog-processes ref="processesRef" :product-id="currentProduct.productId"
|
|
|
|
+ :multiple-selected="handleProcessSelected" />
|
|
<!-- 管理员设置 -->
|
|
<!-- 管理员设置 -->
|
|
<dialog-set-admin ref="setAdminRef" />
|
|
<dialog-set-admin ref="setAdminRef" />
|
|
<!-- 联系人设置 -->
|
|
<!-- 联系人设置 -->
|
|
- <contacts-form ref="setContactsRef" @handleSaveSuccess =getList() />
|
|
|
|
|
|
+ <contacts-form ref="setContactsRef" @handleSaveSuccess=getList() />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -384,7 +289,7 @@ const handleDelete = (row) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch(() => {})
|
|
|
|
|
|
+ .catch(() => { })
|
|
}
|
|
}
|
|
|
|
|
|
/** 设置管理员 **/
|
|
/** 设置管理员 **/
|
|
@@ -413,7 +318,7 @@ const getCurrentSupplierProduct = () => {
|
|
if (supplierProductList.value.length > 0) {
|
|
if (supplierProductList.value.length > 0) {
|
|
currentProduct.value = supplierProductList.value[0]
|
|
currentProduct.value = supplierProductList.value[0]
|
|
proxy.$refs.productTable.setCurrentRow(supplierProductList.value[0])
|
|
proxy.$refs.productTable.setCurrentRow(supplierProductList.value[0])
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
supplierProductProcessList.value = []
|
|
supplierProductProcessList.value = []
|
|
currentProduct.value = {}
|
|
currentProduct.value = {}
|
|
}
|
|
}
|
|
@@ -463,7 +368,7 @@ const handleDelProduct = (row) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch(() => {})
|
|
|
|
|
|
+ .catch(() => { })
|
|
}
|
|
}
|
|
|
|
|
|
/**************************************** 工序相关 ****************************************/
|
|
/**************************************** 工序相关 ****************************************/
|
|
@@ -505,7 +410,7 @@ const handleProcessSelected = (selection) => {
|
|
price: 0.0,
|
|
price: 0.0,
|
|
settlementType: currentSupplier.value.settlementType,
|
|
settlementType: currentSupplier.value.settlementType,
|
|
remark: '',
|
|
remark: '',
|
|
- supplierProductId:currentProduct.value.id
|
|
|
|
|
|
+ supplierProductId: currentProduct.value.id
|
|
}
|
|
}
|
|
dataList.push(newProcess)
|
|
dataList.push(newProcess)
|
|
})
|
|
})
|
|
@@ -539,7 +444,7 @@ const handleDelProcess = (row) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- .catch(() => {})
|
|
|
|
|
|
+ .catch(() => { })
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|