|
@@ -27,6 +27,7 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="info" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
<el-button type="primary" icon="Plus" @click="handleAdd" v-hasPermi="['business:product:add']">新增</el-button>
|
|
|
+ <el-button type="primary" icon="Refresh" @click="handleSync" v-hasPermi="['business:product:sync']">同步P2产品</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- 列表区 -->
|
|
@@ -202,6 +203,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { listProduct, delProduct } from '@/api/business/product'
|
|
|
+import { getP2Product } from '@/api/business/p2.js'
|
|
|
import productForm from './form'
|
|
|
import processChoice from './DialogProcessChoice'
|
|
|
import { listTechnologicalProcessDetail, saveTechnologicalProcessDetail, delTechnologicalProcessDetail, saveSingleTechnologicalProcessDetail } from '@/api/business/technologicalProcessDetail'
|
|
@@ -567,7 +569,13 @@ const handleAddTechnologicalProcess = () => {
|
|
|
technologicalProcessList.value.push(newDetail)
|
|
|
}
|
|
|
/** 工艺添加取消操作 */
|
|
|
-
|
|
|
+const handleSync = () => {
|
|
|
+ productLoading.value = true
|
|
|
+ getP2Product(queryParams.value).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ getList()
|
|
|
+ })
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
getList()
|
|
|
})
|