This commit is contained in:
lb 2023-09-14 14:49:36 +08:00
förälder 1bd826b21c
incheckning 1f99830600
12 ändrade filer med 142 tillägg och 42 borttagningar

Visa fil

@ -40,8 +40,8 @@
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
</script>
<% } %>

Visa fil

@ -33,6 +33,9 @@ export default function () {
},
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: "key",
@ -85,6 +88,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

Visa fil

@ -60,7 +60,9 @@ export default function () {
}
};
const now = new Date().getTime();
const now = new Date()
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]
const today = new Date(y, m, d, 0, 0, 0, 0).getTime()
const headFormFields = [
{
prop: "material",
@ -96,7 +98,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
default: { value: [today - 3600 * 24 * 1000 * 7, today + 3600 * 1000 * 24] },
},
{
button: {

Visa fil

@ -60,7 +60,9 @@ export default function () {
}
};
const now = new Date().getTime();
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: "material",
@ -96,7 +98,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

Visa fil

@ -28,7 +28,9 @@ export default function () {
},
];
const now = new Date().getTime();
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
input: true,
@ -58,7 +60,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [now - 3600 * 24 * 7 * 1000, now] },
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

Visa fil

@ -52,7 +52,9 @@ export default function () {
},
];
const now = new Date().getTime();
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: "orderCode",
@ -119,6 +121,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

Visa fil

@ -15,7 +15,7 @@
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
</section>
<section class="container-content">
<section class="container-content" v-if="dailyStorage.length || middleStorage.length || unknownStorage.length">
<div class="dialy-storage" v-if="dailyStorage.length">
<h3
class=""
@ -38,7 +38,7 @@
:qty="st.qty ?? 0"
:storage="st.name"
color="#8899ff"
:material="st.material ?? '默认物料'"
:material="st.materialName ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio" />
@ -66,7 +66,7 @@
:qty="st.qty ?? 0"
:storage="st.name"
color="#99aa11"
:material="st.material ?? '默认物料'"
:material="st.materialName ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio" />
@ -94,13 +94,17 @@
:qty="st.qty ?? 0"
color="#3388ff"
:storage="st.name"
:material="st.material ?? '默认物料'"
:material="st.materialName ?? '默认物料'"
:total="2"
:unit-value="st.unitDictValue"
:ratio="st.ratio" />
</div>
</div>
</section>
<div v-else style="color: #ccc; letter-spacing: 1px; font-size: 18px; padding: 12px;">
无数据
</div>
</div>
</template>

Visa fil

@ -600,7 +600,7 @@ export default {
customerId: null,
shortDesc: null,
remark: null,
paperboard: null
paperboard: null,
},
visible: false,
requestList: [
@ -770,7 +770,6 @@ export default {
* 因为每个页面也许有独立的需求链
*/
handleBomChange(bomID) {
//console.log("[handleBomChange] val is: ", bomID);
const target = this.cachedList.bom.find((item) => item.id === bomID);
// bomId dataForm
this.bomId = bomID;
@ -826,29 +825,29 @@ export default {
if (res && res.code === 0) {
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
return res.data.bomId; // bomId
return { bomId: res.data.bomId, bomCode: res.data.bomCode }; // bomId
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
type: "error",
duration: 1500,
});
throw new Error(`${res.code}: ${res.msg}`);
}
})
.then((bomId) => {
return this.$http({
url: "/pms/bom/pageById",
method: "get",
params: {
limit: 999,
page: 1,
key: "",
id: bomId,
},
});
.then(({ bomId, bomCode }) => {
return Promise.all([
this.$http({
url: "/pms/bom/pageById",
method: "get",
params: {
limit: 999,
page: 1,
key: "",
id: bomId,
},
}),
this.getBomVersionList({ code: bomCode }),
]);
})
.then(({ data: res }) => {
.then(([{ data: res }]) => {
if (res.code == 0) {
this.cachedList.bom = res.data.list;
this.bomOptions = res.data.list.map((item) => ({
name: item.name,
label: item.code,

Visa fil

@ -8,39 +8,115 @@
<div class="list-view-with-head" ref="pointer-loading-ref">
<el-row :gutter="20">
<el-col :span="6">
<el-input v-model="hu" placeholder="扫描HU号" @keydown.enter.native="handleReport"></el-input>
<el-input
ref="hu"
v-model="hu"
placeholder="扫描HU号"
@keydown.enter.native="handleReport"></el-input>
</el-col>
<el-col :span="6">
<el-col :span="1.5">
<el-button @click="handleReport" type="primary" plain>报工</el-button>
</el-col>
<el-col :span="3">
<el-select v-model="team" placeholder="班次" style="width: 100%">
<el-option label="早班" value="0">早班</el-option>
<el-option label="中班" value="1">中班</el-option>
<el-option label="晚班" value="2">晚班</el-option>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 18px">
<BaseListTable
v-if="dataList.length"
v-loading="tableLoading"
:table-config="tableConfig.table"
:column-config="tableConfig.column"
:table-data="dataList"
:page="listQuery.page"
:size="listQuery.limit"
@operate-event="handleOperate"
:refresh-layout-key="refreshLayoutKey" />
<div style="color: #ccc; letter-spacing: 1px" v-else>暂无数据</div>
</el-row>
</div>
</template>
<script>
// import BaseSearchForm from "@/components/BaseSearchForm.vue";
import BaseListTable from "@/components/BaseListTable.vue";
import moment from "moment";
export default {
name: "PackReport",
// components: { BaseSearchForm },
components: { BaseListTable },
data() {
return {
// hu: "40032179#300000624000000016",
hu: ''
hu: "",
team: "",
tableLoading: false,
tableConfig: {
table: null,
column: [],
},
dataList: [],
listQuery: {
page: 1,
limit: 10,
},
refreshLayoutKey: Math.random(),
};
},
activated() {
this.$refs.hu.focus();
},
mounted() {
this.getList();
},
methods: {
handleOperate() {},
handleReport() {},
async getList() {
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0).getTime();
const { data: res } = await this.$axios({
url: "/pms-am/pms/workReport/pageView",
method: "post",
data: {
externalCode: 2,
startTime: moment(today - 24 * 7 * 60 * 60 * 1000).format("YYYY-MM-DDTHH:mm:ss"),
endTime: moment(today + 24 * 60 * 60 * 1000).format("YYYY-MM-DDTHH:mm:ss"),
page: this.listQuery.page,
limit: this.listQuery.limit,
},
});
if (res.code == 0) {
this.dataList = res.data;
} else {
this.$message.error(res.msg);
}
},
handleReport() {
this.$http({
url: "/pms/workReport/packReport",
method: "post",
data: this.hu,
data: {
hu: this.hu,
team: this.team,
},
headers: {
"Content-Type": "application/json",
},
}).then(({ data: res }) => {
if (res.code == 0) {
this.$message.success("报工成功");
this.getList();
} else {
this.$message.error(res.msg);
}

Visa fil

@ -29,6 +29,9 @@ export default function () {
},
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
// {
// prop: 'code',
@ -49,6 +52,7 @@ export default function () {
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

Visa fil

@ -37,6 +37,9 @@ export default function () {
},
];
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const headFormFields = [
{
prop: "order",
@ -69,7 +72,8 @@ export default function () {
type: "datetimerange",
"start-placeholder": "开始时间",
"end-placeholder": "结束时间",
}
},
default: { value: [today - 24 * 7 * 1000 * 3600, today + 3600 * 24 * 1000] },
},
{
button: {

Visa fil

@ -36,7 +36,7 @@ export default function () {
{ width: 200, prop: "shapeShortDesc", label: "喷码描述" },
{ width: 120, prop: "prodqty", label: "要求生产数量" },
{ width: 128, prop: "paperboard", label: "是否贴纸板", filter: (val) => ["否", "是"][val] },
{ width: 128, prop: "palletType", label: "托盘类型", filter: dictFilter("pallet_type") },
{ width: 128, prop: "palletType", label: "托盘类型", filter: val => (val != null) ? ['非熏蒸', '熏蒸'][val] : '-' },
{ width: 120, prop: "remark", label: "备注" },
{ width: 120, prop: "createTime", label: "报工时间", filter: timeFilter },
{ width: 120, prop: "creatorName", label: "报工人" },
@ -168,7 +168,7 @@ export default function () {
optionLabel: "code",
customLabel: "cate",
fetchData: () => this.$http.post("/pms/order/listForReport"),
elparams: { placeholder: "请选择订单" },
elparams: { placeholder: "请选择订单", filterable: true },
rules: [{ required: true, message: "必填项不能为空", trigger: "blur" }],
},
{
@ -250,7 +250,7 @@ export default function () {
// prop: "description",
// },
// ],
// [{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
[{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } }],
],
operations: [
{