|
|
|
@ -77,6 +77,32 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="12" :offset="0"> |
|
|
|
|
<el-form-item label="其他支出"> |
|
|
|
|
<el-select v-model="extraPay.extraPayType" placeholder="其他支出类型" filterable> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in extraPayOptions" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.extraPayName" |
|
|
|
|
:value="item.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="12" :offset="0"> |
|
|
|
|
<el-form-item label="支出金额"> |
|
|
|
|
<el-input-number v-model="extraPay.extraPayMoney" :controls="false" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
<el-col :span="24" :offset="0"> |
|
|
|
|
<el-form-item label="支出备注"> |
|
|
|
|
<el-input v-model="extraPay.remark" placeholder="备注信息" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-table :data="inventoryList" @selection-change="handleSelectionChange"> |
|
|
|
@ -98,7 +124,7 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</template> |
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
<el-form-item label="发货备注"> |
|
|
|
|
<Editor v-model:modelValue="form.remark" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
@ -116,15 +142,20 @@ import { getSimpleWarehouseList, getRemainInventoryList } from '@/api/mall/wareh |
|
|
|
|
import { createDelivery } from '@/api/clue/delivery' |
|
|
|
|
import { getConfigList } from '@/api/system/set' |
|
|
|
|
import { getDictOptions } from '@/utils/dict' |
|
|
|
|
import { getExtraFeeSimpleList } from '@/api/clue/extraFee' |
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
|
|
const warehouseOptions = ref([]) |
|
|
|
|
const extraPayOptions = ref([]) |
|
|
|
|
const supplierOptions = getDictOptions('erp_supplier') |
|
|
|
|
function getOptions() { |
|
|
|
|
getSimpleWarehouseList().then((data) => { |
|
|
|
|
warehouseOptions.value = data |
|
|
|
|
}) |
|
|
|
|
getExtraFeeSimpleList().then((data) => { |
|
|
|
|
extraPayOptions.value = data |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getRemainInventory(signProductId) { |
|
|
|
@ -144,6 +175,7 @@ defineExpose({ |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const form = ref({}) |
|
|
|
|
const extraPay = ref({}) |
|
|
|
|
const rules = ref({ |
|
|
|
|
supplier: { required: true, message: '供应商不可为空', trigger: 'change' }, |
|
|
|
|
warehouseId: { required: true, message: '仓库不可为空', trigger: 'change' }, |
|
|
|
@ -164,6 +196,11 @@ function resetForm(row) { |
|
|
|
|
unitPrice: undefined, |
|
|
|
|
remark: undefined |
|
|
|
|
} |
|
|
|
|
extraPay.value = { |
|
|
|
|
extraPayType: undefined, |
|
|
|
|
extraPayMoney: undefined, |
|
|
|
|
remark: undefined |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['success']) |
|
|
|
@ -209,6 +246,9 @@ async function onSubmit() { |
|
|
|
|
unitPrice: form.value.unitPrice, |
|
|
|
|
warehouseId: form.value.warehouseId |
|
|
|
|
} |
|
|
|
|
if (extraPay.value.extraPayMoney) { |
|
|
|
|
params.purchaseOrder.extraPay = [extraPay.value] |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
params.detailList = deliveryArr.value |
|
|
|
|
} |
|
|
|
|