|
@@ -27,6 +27,15 @@
|
|
|
@click="multipleDelete"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :size="size"
|
|
|
+ @click="syncPosition"
|
|
|
+ >wcs数据同步
|
|
|
+ <template #icon>
|
|
|
+ <svg-icon icon-class="paicheng" />
|
|
|
+ </template>
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<el-dialog
|
|
@@ -43,8 +52,7 @@
|
|
|
<script setup>
|
|
|
import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
-import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
-
|
|
|
+import { syncPositionVehicle} from "@/api/storage";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
@@ -74,6 +82,17 @@ const materialInfo = (value) => {
|
|
|
form.value.unit = value.unitDictValue
|
|
|
dialog1.visible = false
|
|
|
}
|
|
|
+const syncPosition = () => {
|
|
|
+ ElMessageBox.confirm("当前非同步任务,预计5秒内完成,确定同步库存吗?")
|
|
|
+ .then(() => {
|
|
|
+ syncPositionVehicle({}).then((data) => {
|
|
|
+ ElMessage.success(data.msg);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // catch error
|
|
|
+ });
|
|
|
+};
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
delBtn: false,
|