add:外部接口

This commit is contained in:
2025-06-05 10:07:27 +08:00
parent 7a718a5357
commit a891c3b201
21 changed files with 496 additions and 22 deletions

View File

@@ -20,7 +20,18 @@
</el-col>
</el-row>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation />
<crudOperation>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-refresh"
size="mini"
@click="materialSync"
>
物料同步
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"
@@ -232,6 +243,12 @@ export default {
},
[CRUD.HOOK.beforeToCU](crud, form) {
},
materialSync() {
crudMaterial.materialSync({}).then(res => {
this.crud.toQuery()
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
// 改变状态
changeEnabled(data, val) {
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.material_name + ', 是否继续', '提示', {

View File

@@ -47,4 +47,12 @@ export function getProductSeries() {
})
}
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries }
export function materialSync(data) {
return request({
url: 'api/Materia/materialSync',
method: 'post',
data
})
}
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries, materialSync }

View File

@@ -95,7 +95,7 @@
<el-table-column prop="base_qty" label="库存数量" :formatter="crud.formatNum3" align="center" :min-width="flexWidth('base_qty',crud.data,'库存数量')" />
<el-table-column prop="fac_qty" label="盘点数量" align="center" :min-width="flexWidth('fac_qty',crud.data,'盘点数量')">
<template scope="scope">
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="3" :min="0" />
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="3" :min="0" :disabled="scope.row.status === '99'" />
<span v-show="isShow(scope.$index, scope.row,4)">{{ scope.row.fac_qty }}</span>
</template>
</el-table-column>