feat 辅材到货单

This commit is contained in:
Amjacks 2025-04-10 19:07:14 +08:00
parent 0f0e520b49
commit d59cce55e8
3 changed files with 25 additions and 4 deletions

View File

@ -11,6 +11,7 @@
</el-row> </el-row>
</el-form> </el-form>
<div class="page-search-btns"> <div class="page-search-btns">
<el-button type="primary" @click="addDeliveryNote">新增到货单</el-button>
<el-button type="primary" @click="handleQuery">搜索</el-button> <el-button type="primary" @click="handleQuery">搜索</el-button>
</div> </div>
</el-row> </el-row>
@ -91,6 +92,7 @@
</el-form> </el-form>
</el-row> </el-row>
</div> </div>
<drawer v-if="showDeliveryDrawer" v-model="showDeliveryDrawer" @refresh="refresh" :delivery-type="'02'"/>
</div> </div>
</template> </template>
@ -110,6 +112,7 @@ import { IFTRUE, areAllNotEmpty, msToDate } from "@/utils/CommonUtil"
import { NoChargeStockIn } from '@/api/StockIn' import { NoChargeStockIn } from '@/api/StockIn'
import {getOpCode} from "@/api/opcode"; import {getOpCode} from "@/api/opcode";
import { bTableHeight } from "../../../composables/calcTableHeight"; import { bTableHeight } from "../../../composables/calcTableHeight";
import Drawer from '@/views/stockIn/delivery/drawer.vue'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(220); const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(220);
const route = useRoute() const route = useRoute()
@ -134,6 +137,7 @@ const state = reactive({
button_state: false, button_state: false,
MATERIALRECEIVEACT: [] as any, MATERIALRECEIVEACT: [] as any,
ReceiveACTList: [] as any, ReceiveACTList: [] as any,
showDeliveryDrawer: false,
queryParams: { queryParams: {
queryId: "", queryId: "",
version: "", version: "",
@ -165,7 +169,7 @@ const state = reactive({
userList: [] as any, userList: [] as any,
column: [] as any, column: [] as any,
}); });
const { ERPFACTORY, MATERIALRECEIVEACT, rsa, queryParams, loading, button_loading, userList, column, operateParams } = toRefs(state); const { ERPFACTORY, MATERIALRECEIVEACT, rsa, showDeliveryDrawer, queryParams, loading, button_loading, userList, column, operateParams } = toRefs(state);
onMounted(() =>{ onMounted(() =>{
var newDate = new Date(); var newDate = new Date();
@ -209,6 +213,18 @@ function SelectReceiveAct() {
}) })
} }
//
function addDeliveryNote() {
state.showDeliveryDrawer = true
}
//
function refresh(data:any) {
state.queryParams.params.RECEIVEREQUESTNAME = data
state.showDeliveryDrawer = false
handleQuery()
}
// //
function updateList(col: any) { function updateList(col: any) {
state.column = col; state.column = col;

View File

@ -189,7 +189,7 @@
</el-form> </el-form>
</el-drawer> </el-drawer>
</div> </div>
<drawer v-if="showDeliveryDrawer" v-model="showDeliveryDrawer" @refresh="refresh"/> <drawer v-if="showDeliveryDrawer" v-model="showDeliveryDrawer" @refresh="refresh" :delivery-type="'01'"/>
</div> </div>
</template> </template>
@ -216,7 +216,7 @@ import { getOpCode } from '@/api/opcode'
import { printLabel } from '@/api/label' import { printLabel } from '@/api/label'
import { bTableHeight } from '@/composables/calcTableHeight' import { bTableHeight } from '@/composables/calcTableHeight'
import { cals } from '@/utils/cal' import { cals } from '@/utils/cal'
import Drawer from '@/views/stockIn/StockInByCharge/drawer.vue' import Drawer from '@/views/stockIn/delivery/drawer.vue'
const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(530) const { tableContainer, tableHeight, updateTableHeight, handleResize } = bTableHeight(530)
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)

View File

@ -108,6 +108,11 @@ import { getORG } from '@/api/auth'
const queryFormRef = ref(ElForm) const queryFormRef = ref(ElForm)
const { proxy }: any = getCurrentInstance() const { proxy }: any = getCurrentInstance()
const props = defineProps<{
deliveryType: string;
}>();
// //
let state = reactive({ let state = reactive({
dataList: [] as any, // dataList: [] as any, //
@ -218,7 +223,7 @@ function handleCreate() {
let name = "DK" + Date.now() let name = "DK" + Date.now()
createDelivery({ createDelivery({
deliveryName: name, deliveryName: name,
deliveryType: '01', deliveryType: props.deliveryType,
siteName: 'SDK', siteName: 'SDK',
receiveList: state.receiveList receiveList: state.receiveList
}).then((res: any) => { }).then((res: any) => {