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