add:生产下料同步

This commit is contained in:
zhangzq
2026-06-17 13:22:38 +08:00
32 changed files with 512 additions and 75 deletions

View File

@@ -27,8 +27,8 @@
</el-form>
</div>
<crudOperation :permission="permission">
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">强制回传</el-button>
<el-button slot="right" class="filter-item" type="success" size="mini" @click="issueReturnBill">条码打印</el-button>
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传</el-button>
<el-button slot="right" class="filter-item" type="primary" icon="el-icon-printer" size="mini" :disabled="audit_flag" @click="printBill">打印</el-button>
</crudOperation>
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
<el-table-column type="selection" width="55" />
@@ -48,6 +48,35 @@
<el-table-column label="明细数" align="center" prop="dtl_count" width="80" />
<el-table-column label="单据总数" align="center" prop="total_qty" width="80" />
<el-table-column label="入库数量" align="center" prop="instock_qty" width="80" />
<el-table-column label="转发中鼎" align="center" prop="forwardZD" width="80">
<template slot-scope="scope">
<p v-if="scope.row.forwardZD == '0'">-</p>
<template v-else-if="scope.row.forwardZD == '1'">
<el-popconfirm
confirm-button-text=""
cancel-button-text=""
icon="el-icon-info"
icon-color="red"
title="是否重新转发中鼎?"
@confirm="toForwardZD"
>
<a slot="reference" style="color: red;text-decoration: underline">失败</a>
</el-popconfirm>
</template>
<!-- <a style="color: red;text-decoration: underline" v-else-if="scope.row.forwardZD == '1'">-->
<!-- <el-popconfirm-->
<!-- class="box-item"-->
<!-- title="是否重新转发?"-->
<!-- placement="top-start"-->
<!-- >-->
<!-- <template #reference>-->
<!-- 失败-->
<!-- </template>-->
<!-- </el-popconfirm>-->
<!-- </a>-->
<p v-else>成功</p>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="supplier_code" width="120" label="供应商编码" />
<el-table-column show-overflow-tooltip prop="supplier_name" width="150" label="供应商名称" />
<el-table-column show-overflow-tooltip prop="creator" width="100" label="创建人" />
@@ -61,8 +90,8 @@
{{ formatDate(scope.row.modify_date) }}
</template>
</el-table-column>
<!-- <el-table-column prop="status" :formatter="auditStatusFormat" width="100" label="审核状态" />-->
<!-- <el-table-column show-overflow-tooltip prop="audit_msg" width="150" label="审核信息" />-->
<!-- <el-table-column prop="status" :formatter="auditStatusFormat" width="100" label="审核状态" />-->
<!-- <el-table-column show-overflow-tooltip prop="audit_msg" width="150" label="审核信息" />-->
</el-table>
<pagination />
</div>
@@ -137,6 +166,9 @@ export default {
const s = String(d.getSeconds()).padStart(2, '0')
return y + '-' + m + '-' + day + ' ' + h + ':' + min + ':' + s
},
toForwardZD() {
console.log(123)
},
toView(index, row) {
this.mstrow = row
this.viewShow = true
@@ -147,7 +179,7 @@ export default {
// this.$refs.table.clearSelection()
// this.$refs.table.toggleRowSelection(val.pop())
this.audit_flag = true
}else {
} else {
this.audit_flag = false
}
},
@@ -183,6 +215,26 @@ export default {
this.crud.notify('下发失败', CRUD.NOTIFICATION_TYPE.ERROR)
})
}).catch(() => {})
},
printBill() {
const selections = this.crud.selections
if (!selections || selections.length === 0) {
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const ids = selections.map(s => s.id)
const billIds = selections.map(s => s.bill_id).join('、')
this.$confirm('确认打印以下单据的物料标签?\n' + billIds, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
crudPurchase.print(ids).then(() => {
this.crud.notify('打印指令已发送', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => {
this.crud.notify('打印失败', CRUD.NOTIFICATION_TYPE.ERROR)
})
}).catch(() => {})
}
}
}

View File

@@ -39,4 +39,12 @@ export function issueReturnBill(data) {
})
}
export default { add, edit, del, get, issueReturnBill }
export function print(ids) {
return request({
url: '/api/purchasemst/print',
method: 'post',
data: ids
})
}
export default { add, edit, del, get, issueReturnBill, print }