单据配置相关修改

yanshishuju
yewj 7 months ago
parent b30a92b8c2
commit e985790e86

@ -0,0 +1,18 @@
import axios from "@/utils/request";
export function getSet(query) {
return axios({
url: "/udiwms/ioSplit/collect/getSet",
method: "get",
params: query
});
}
export function updateSet(query) {
return axios({
url: "/udiwms/ioSplit/collect/updateSet",
method: "post",
data: query
});
}

@ -1,15 +1,28 @@
<template>
<div>
<el-card>
<el-form :model="formData" :rules="formRules" label-width="140px" ref="dataForm">
<el-form :model="formData" :rules="formRules" label-width="160px" ref="dataForm">
<el-button-group style="display: flex;margin: 0px 0 10px 90%; ">
<el-button type="primary" @click.native="save()">保存</el-button>
</el-button-group>
<el-collapse v-model="activeNames">
<el-collapse-item name="0">
<template slot="title">
<p class="form-title">下载设置</p>
<p class="form-title">原始单据下载设置</p>
</template>
<el-row :gutter="20">
<el-col :span="11" class="el-col">
<el-col :span="8" class="el-col">
<el-form-item label="开启单据自动下载:" prop="autoDownload" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoDownload">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" class="el-col">
<el-form-item label="起始下载时间:" prop="startDownloadTime" label-width="160px">
<el-date-picker
v-model="formData.startDownloadTime"
@ -18,64 +31,78 @@
style="width: 90%"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
@change="save()"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="1">
<template slot="title">
<p class="form-title">单据自助上传设置</p>
<p class="form-title">原始单据处理设置</p>
</template>
<el-row :gutter="20">
<!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="流通计量层级单位:" prop="distributeLevelUnit" label-width="160px">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入流通计量层级单位"-->
<!-- disabled-->
<!-- v-model="newProductData.distributeLevelUnit"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="使用计量层级单位:" prop="useLevelUnit" label-width="160px">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入使用计量层级标识"-->
<!-- disabled-->
<!-- v-model.trim="newProductData.useLevelUnit"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="流通时含计量单元数量:" prop="distributeLevelCount" label-width="160px">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入流通时包含计量单元的数量"-->
<!-- v-model.trim="newProductData.distributeLevelCount"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11" class="el-col">-->
<!-- <el-form-item label="使用时含计量单元数量:" prop="useLeverCount" label-width="160px">-->
<!-- <el-input style="width: 90%" size="small" placeholder="请输入使用时包含计量单元的数量"-->
<!-- v-model.trim="newProductData.useLeverCount"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8" class="el-col">
<el-form-item label="自动转成待处理单据:" prop="autoDealOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoDealOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="2">
<template slot="title">
<p class="form-title">单据处理设置</p>
</template>
<el-row :gutter="20">
<el-col :span="8" class="el-col">
<el-form-item label="待处理单据自动分配:" prop="autoAllotOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoAllotOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8" class="el-col">
<el-form-item label="单据自动完成:" prop="autoFinishOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoFinishOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
<el-collapse-item name="3">
<template slot="title">
<p class="form-title">单据上传设置</p>
</template>
<el-row :gutter="20">
<el-col :span="8" class="el-col">
<el-form-item label="已完成单据自动上传:" prop="autoUploadOrder" style="margin-bottom: 0">
<el-radio-group v-model="formData.autoUploadOrder">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</el-card>
</div>
</template>
<script>
import { selectSysParamByKey ,systemParamConfigSave} from '@/api/param/systemParamConfig'
import {getSet, updateSet} from "@/api/collect/collectSet";
export default {
name: 'timerSetting',
@ -86,30 +113,25 @@ export default {
formData: {
startDownloadTime: null
},
systemParam:null,
systemParam: null,
}
},
methods: {
selectSysParam() {
let query = {
paramKey: 'startDownloadTime'
}
selectSysParamByKey(query).then((response) => {
getSet().then((response) => {
if (response.code == 20000) {
this.formData.startDownloadTime = response.data.paramValue
this.systemParam = response.data
this.formData = response.data
}
})
},
save() {
this.systemParam.paramValue = this.formData.startDownloadTime
systemParamConfigSave(this.systemParam, 'save')
updateSet(this.formData)
.then((response) => {
if (response.code != 20000) {
this.$message.error(response.message);
}else
this.$message.success("操作成功");
} else
this.$message.success("操作成功");
})
.catch(() => {
});

@ -62,7 +62,8 @@
</el-col>
</el-row>
<el-row style="margin-top: 6px;margin-bottom: -6px;" v-if="this.formDataVisible != null && this.formDataVisible.scanType == 1">
<el-row style="margin-top: 6px;margin-bottom: -6px;"
v-if="this.formDataVisible != null && this.formDataVisible.scanType == 1">
<!-- <el-col :span="6">-->
<!-- <el-form-item prop="workPlaceCode" class="query-form-item" label="当前工位:">-->
<!-- <el-select-->
@ -127,7 +128,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<!-- :label="this.formDataVisible.unitTittle + ':'"-->
<!-- :label="this.formDataVisible.unitTittle + ':'"-->
<el-form-item class="query-form-item" label="收货方">
<el-select v-model="formData.fromCorp"
filterable
@ -1272,18 +1273,27 @@ export default {
if (str.startsWith("MA")) {
return true;
}
// 2. "01" 18
if (str.startsWith("01") && str.length >= 18) {
return true;
}
// 3. "#" "#" 4
if (str.startsWith("#") && (str.match(/#/g) || []).length >= 4) {
return true;
}
// 4. "8" 20
if (str.startsWith("8") && str.length === 20) {
return true;
}
// 5. "11", "17", "21", "10"
const prefixes = ["11", "17", "21", "10"];
if (prefixes.some(prefix => str.startsWith(prefix))) {
return true;
}
// false
return false;
}

Loading…
Cancel
Save