|
@@ -26,6 +26,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="info" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button type="primary" icon="Plus" @click="handleShowSupplierDialog(null)">添加</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 列表区 -->
|
|
@@ -42,13 +43,15 @@
|
|
|
>
|
|
|
<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="120" align="center" prop="productDescription" />
|
|
|
+ <el-table-column label="助记码" width="120" align="center" prop="mnemonicCode" />
|
|
|
<el-table-column label="发货方式" width="80" align="center" prop="deliveryMethod">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="delivery_method" :value="scope.row.deliveryMethod" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="损耗上限" width="80" align="center" prop="lossLimit" />
|
|
|
+ <el-table-column label="损耗上限" width="80" align="center" prop="lossLimit">
|
|
|
+ <template #default="scope"> {{ scope.row.lossLimit }}% </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
<el-table-column label="操作" width="132" align="center">
|
|
|
<template #default="scope">
|
|
@@ -57,17 +60,19 @@
|
|
|
link
|
|
|
type="warning"
|
|
|
icon="Edit"
|
|
|
- @click="handleEdit(scope.row)"
|
|
|
- >编辑</el-button
|
|
|
+ @click="handleShowSupplierDialog(scope.row)"
|
|
|
>
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-hasPermi="['system:supplier:remove']"
|
|
|
link
|
|
|
type="danger"
|
|
|
icon="Delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
- >删除</el-button
|
|
|
>
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -105,8 +110,9 @@
|
|
|
icon="Plus"
|
|
|
@click="handleShowProductsDialog(null)"
|
|
|
:disabled="!currentSupplier.id"
|
|
|
- >添加产品</el-button
|
|
|
>
|
|
|
+ 添加产品
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="el-table-container">
|
|
@@ -207,7 +213,7 @@
|
|
|
:step="0.00000001"
|
|
|
controls-position="right"
|
|
|
/>
|
|
|
- <span v-else>{{ scope.row.price }}</span>
|
|
|
+ <span v-else>{{ scope.row.priceLabel }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
@@ -226,8 +232,11 @@
|
|
|
</div>
|
|
|
</section>
|
|
|
</section>
|
|
|
-
|
|
|
+ <!-- 供应商表单 -->
|
|
|
+ <dialog-form ref="formRef" @handleSaveSuccess="handleQuery" :delivery-method="delivery_method" />
|
|
|
+ <!-- 产品添加对话框 -->
|
|
|
<dialog-products ref="productsRef" :supplier-id="currentSupplier.id" :multiple-selected="handleProductSelected" />
|
|
|
+ <!-- 工序添加对话框 -->
|
|
|
<dialog-processes
|
|
|
ref="processesRef"
|
|
|
:product-id="currentProduct.productId"
|
|
@@ -248,6 +257,7 @@ import {
|
|
|
saveSupplierProductProcess,
|
|
|
removeSupplierProductProcess
|
|
|
} from '@/api/business/supplier'
|
|
|
+import dialogForm from './form'
|
|
|
import dialogProducts from './DialogProducts'
|
|
|
import dialogProcesses from './DialogProcesses'
|
|
|
const { proxy } = getCurrentInstance()
|
|
@@ -312,6 +322,11 @@ const handleQuery = () => {
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
+/** 打开供应商对话框 **/
|
|
|
+const handleShowSupplierDialog = (data) => {
|
|
|
+ proxy.$refs.formRef.open(data)
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 外协商的 current change 事件
|
|
|
*/
|
|
@@ -322,6 +337,20 @@ const handleCurrentSupplierChange = (row) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const handleDelete = (row) => {
|
|
|
+ proxy.$modal
|
|
|
+ .confirm('确认删除数据项?')
|
|
|
+ .then(() => {
|
|
|
+ remove(row.id).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ proxy.$modal.msgSuccess('删除成功!')
|
|
|
+ getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+}
|
|
|
+
|
|
|
/**************************************** 产品相关 ****************************************/
|
|
|
/** 产品打开对话框方法 */
|
|
|
const handleShowProductsDialog = () => {
|