|
@@ -30,6 +30,7 @@ import { ElMessage } from "element-plus";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
const warehouseList = ref([]);
|
|
const warehouseList = ref([]);
|
|
|
|
+const productType = ref([]);
|
|
const status = ref([
|
|
const status = ref([
|
|
{
|
|
{
|
|
label: "待入库",
|
|
label: "待入库",
|
|
@@ -61,6 +62,14 @@ const businessType = ref([
|
|
label: "退货出库",
|
|
label: "退货出库",
|
|
value: 4,
|
|
value: 4,
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ label: "京东订单",
|
|
|
|
+ value: 5,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "销售订单出库",
|
|
|
|
+ value: 6,
|
|
|
|
+ },
|
|
]);
|
|
]);
|
|
const sourceList = ref({
|
|
const sourceList = ref({
|
|
data: [],
|
|
data: [],
|
|
@@ -108,6 +117,9 @@ const config = computed(() => {
|
|
prop: "productType",
|
|
prop: "productType",
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
|
|
+ render(type) {
|
|
|
|
+ return proxy.dictValueLabel(type, productType.value);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
@@ -162,17 +174,19 @@ const config = computed(() => {
|
|
},
|
|
},
|
|
renderHTML(row) {
|
|
renderHTML(row) {
|
|
return [
|
|
return [
|
|
- {
|
|
|
|
- attrs: {
|
|
|
|
- label: "入库",
|
|
|
|
- type: "primary",
|
|
|
|
- text: true,
|
|
|
|
- },
|
|
|
|
- el: "button",
|
|
|
|
- click() {
|
|
|
|
- clickOperation(row);
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ row.status !== 2
|
|
|
|
+ ? {
|
|
|
|
+ attrs: {
|
|
|
|
+ label: "入库",
|
|
|
|
+ type: "primary",
|
|
|
|
+ text: true,
|
|
|
|
+ },
|
|
|
|
+ el: "button",
|
|
|
|
+ click() {
|
|
|
|
+ clickOperation(row);
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ : {},
|
|
];
|
|
];
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -189,6 +203,12 @@ const getDict = () => {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ proxy.getDictOne(["product_type"]).then((res) => {
|
|
|
|
+ productType.value = res["product_type"].map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
|
|
+ });
|
|
};
|
|
};
|
|
const getList = async (req) => {
|
|
const getList = async (req) => {
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|