up
This commit is contained in:
396
.eslintrc.js
396
.eslintrc.js
@@ -1,199 +1,199 @@
|
||||
// ESlint 检查配置
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true,
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
// // ESlint 检查配置
|
||||
// module.exports = {
|
||||
// root: true,
|
||||
// parserOptions: {
|
||||
// parser: 'babel-eslint',
|
||||
// sourceType: 'module'
|
||||
// },
|
||||
// env: {
|
||||
// browser: true,
|
||||
// node: true,
|
||||
// es6: true,
|
||||
// },
|
||||
// extends: ['plugin:vue/recommended', 'eslint:recommended'],
|
||||
|
||||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
"vue/max-attributes-per-line": [2, {
|
||||
"singleline": 10,
|
||||
"multiline": {
|
||||
"max": 1,
|
||||
"allowFirstLine": false
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'block-spacing': [2, 'always'],
|
||||
'brace-style': [2, '1tbs', {
|
||||
'allowSingleLine': true
|
||||
}],
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'comma-style': [2, 'last'],
|
||||
'constructor-super': 2,
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'handle-callback-err': [2, '^(err|error)$'],
|
||||
'indent': [2, 2, {
|
||||
'SwitchCase': 1
|
||||
}],
|
||||
'jsx-quotes': [2, 'prefer-single'],
|
||||
'key-spacing': [2, {
|
||||
'beforeColon': false,
|
||||
'afterColon': true
|
||||
}],
|
||||
'keyword-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
}],
|
||||
'new-cap': [2, {
|
||||
'newIsCap': true,
|
||||
'capIsNew': false
|
||||
}],
|
||||
'new-parens': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-caller': 2,
|
||||
'no-console': 'off',
|
||||
'no-class-assign': 2,
|
||||
'no-cond-assign': 2,
|
||||
'no-const-assign': 2,
|
||||
'no-control-regex': 0,
|
||||
'no-delete-var': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eval': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
'no-extra-parens': [2, 'functions'],
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-implied-eval': 2,
|
||||
'no-inner-declarations': [2, 'functions'],
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-iterator': 2,
|
||||
'no-label-var': 2,
|
||||
'no-labels': [2, {
|
||||
'allowLoop': false,
|
||||
'allowSwitch': false
|
||||
}],
|
||||
'no-lone-blocks': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
'max': 1
|
||||
}],
|
||||
'no-native-reassign': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-new-object': 2,
|
||||
'no-new-require': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-return-assign': [2, 'except-parens'],
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unneeded-ternary': [2, {
|
||||
'defaultAssignment': false
|
||||
}],
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'no-unused-vars': [2, {
|
||||
'vars': 'all',
|
||||
'args': 'none'
|
||||
}],
|
||||
'no-useless-call': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-escape': 0,
|
||||
'no-whitespace-before-property': 2,
|
||||
'no-with': 2,
|
||||
'one-var': [2, {
|
||||
'initialized': 'never'
|
||||
}],
|
||||
'operator-linebreak': [2, 'after', {
|
||||
'overrides': {
|
||||
'?': 'before',
|
||||
':': 'before'
|
||||
}
|
||||
}],
|
||||
'padded-blocks': [2, 'never'],
|
||||
'quotes': [2, 'single', {
|
||||
'avoidEscape': true,
|
||||
'allowTemplateLiterals': true
|
||||
}],
|
||||
'semi': [2, 'never'],
|
||||
'semi-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
}],
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': [2, {
|
||||
'words': true,
|
||||
'nonwords': false
|
||||
}],
|
||||
'spaced-comment': [2, 'always', {
|
||||
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||
}],
|
||||
'template-curly-spacing': [2, 'never'],
|
||||
'use-isnan': 2,
|
||||
'valid-typeof': 2,
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
'yoda': [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
'object-curly-spacing': [2, 'always', {
|
||||
objectsInObjects: false
|
||||
}],
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
}
|
||||
}
|
||||
// // add your custom rules here
|
||||
// //it is base on https://github.com/vuejs/eslint-config-vue
|
||||
// rules: {
|
||||
// "vue/max-attributes-per-line": [2, {
|
||||
// "singleline": 10,
|
||||
// "multiline": {
|
||||
// "max": 1,
|
||||
// "allowFirstLine": false
|
||||
// }
|
||||
// }],
|
||||
// "vue/singleline-html-element-content-newline": "off",
|
||||
// "vue/multiline-html-element-content-newline":"off",
|
||||
// "vue/name-property-casing": ["error", "PascalCase"],
|
||||
// "vue/no-v-html": "off",
|
||||
// 'accessor-pairs': 2,
|
||||
// 'arrow-spacing': [2, {
|
||||
// 'before': true,
|
||||
// 'after': true
|
||||
// }],
|
||||
// 'block-spacing': [2, 'always'],
|
||||
// 'brace-style': [2, '1tbs', {
|
||||
// 'allowSingleLine': true
|
||||
// }],
|
||||
// 'camelcase': [0, {
|
||||
// 'properties': 'always'
|
||||
// }],
|
||||
// 'comma-dangle': [2, 'never'],
|
||||
// 'comma-spacing': [2, {
|
||||
// 'before': false,
|
||||
// 'after': true
|
||||
// }],
|
||||
// 'comma-style': [2, 'last'],
|
||||
// 'constructor-super': 2,
|
||||
// 'curly': [2, 'multi-line'],
|
||||
// 'dot-location': [2, 'property'],
|
||||
// 'eol-last': 2,
|
||||
// 'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
// 'generator-star-spacing': [2, {
|
||||
// 'before': true,
|
||||
// 'after': true
|
||||
// }],
|
||||
// 'handle-callback-err': [2, '^(err|error)$'],
|
||||
// 'indent': [2, 2, {
|
||||
// 'SwitchCase': 1
|
||||
// }],
|
||||
// 'jsx-quotes': [2, 'prefer-single'],
|
||||
// 'key-spacing': [2, {
|
||||
// 'beforeColon': false,
|
||||
// 'afterColon': true
|
||||
// }],
|
||||
// 'keyword-spacing': [2, {
|
||||
// 'before': true,
|
||||
// 'after': true
|
||||
// }],
|
||||
// 'new-cap': [2, {
|
||||
// 'newIsCap': true,
|
||||
// 'capIsNew': false
|
||||
// }],
|
||||
// 'new-parens': 2,
|
||||
// 'no-array-constructor': 2,
|
||||
// 'no-caller': 2,
|
||||
// 'no-console': 'off',
|
||||
// 'no-class-assign': 2,
|
||||
// 'no-cond-assign': 2,
|
||||
// 'no-const-assign': 2,
|
||||
// 'no-control-regex': 0,
|
||||
// 'no-delete-var': 2,
|
||||
// 'no-dupe-args': 2,
|
||||
// 'no-dupe-class-members': 2,
|
||||
// 'no-dupe-keys': 2,
|
||||
// 'no-duplicate-case': 2,
|
||||
// 'no-empty-character-class': 2,
|
||||
// 'no-empty-pattern': 2,
|
||||
// 'no-eval': 2,
|
||||
// 'no-ex-assign': 2,
|
||||
// 'no-extend-native': 2,
|
||||
// 'no-extra-bind': 2,
|
||||
// 'no-extra-boolean-cast': 2,
|
||||
// 'no-extra-parens': [2, 'functions'],
|
||||
// 'no-fallthrough': 2,
|
||||
// 'no-floating-decimal': 2,
|
||||
// 'no-func-assign': 2,
|
||||
// 'no-implied-eval': 2,
|
||||
// 'no-inner-declarations': [2, 'functions'],
|
||||
// 'no-invalid-regexp': 2,
|
||||
// 'no-irregular-whitespace': 2,
|
||||
// 'no-iterator': 2,
|
||||
// 'no-label-var': 2,
|
||||
// 'no-labels': [2, {
|
||||
// 'allowLoop': false,
|
||||
// 'allowSwitch': false
|
||||
// }],
|
||||
// 'no-lone-blocks': 2,
|
||||
// 'no-mixed-spaces-and-tabs': 2,
|
||||
// 'no-multi-spaces': 2,
|
||||
// 'no-multi-str': 2,
|
||||
// 'no-multiple-empty-lines': [2, {
|
||||
// 'max': 1
|
||||
// }],
|
||||
// 'no-native-reassign': 2,
|
||||
// 'no-negated-in-lhs': 2,
|
||||
// 'no-new-object': 2,
|
||||
// 'no-new-require': 2,
|
||||
// 'no-new-symbol': 2,
|
||||
// 'no-new-wrappers': 2,
|
||||
// 'no-obj-calls': 2,
|
||||
// 'no-octal': 2,
|
||||
// 'no-octal-escape': 2,
|
||||
// 'no-path-concat': 2,
|
||||
// 'no-proto': 2,
|
||||
// 'no-redeclare': 2,
|
||||
// 'no-regex-spaces': 2,
|
||||
// 'no-return-assign': [2, 'except-parens'],
|
||||
// 'no-self-assign': 2,
|
||||
// 'no-self-compare': 2,
|
||||
// 'no-sequences': 2,
|
||||
// 'no-shadow-restricted-names': 2,
|
||||
// 'no-spaced-func': 2,
|
||||
// 'no-sparse-arrays': 2,
|
||||
// 'no-this-before-super': 2,
|
||||
// 'no-throw-literal': 2,
|
||||
// 'no-trailing-spaces': 2,
|
||||
// 'no-undef': 2,
|
||||
// 'no-undef-init': 2,
|
||||
// 'no-unexpected-multiline': 2,
|
||||
// 'no-unmodified-loop-condition': 2,
|
||||
// 'no-unneeded-ternary': [2, {
|
||||
// 'defaultAssignment': false
|
||||
// }],
|
||||
// 'no-unreachable': 2,
|
||||
// 'no-unsafe-finally': 2,
|
||||
// 'no-unused-vars': [2, {
|
||||
// 'vars': 'all',
|
||||
// 'args': 'none'
|
||||
// }],
|
||||
// 'no-useless-call': 2,
|
||||
// 'no-useless-computed-key': 2,
|
||||
// 'no-useless-constructor': 2,
|
||||
// 'no-useless-escape': 0,
|
||||
// 'no-whitespace-before-property': 2,
|
||||
// 'no-with': 2,
|
||||
// 'one-var': [2, {
|
||||
// 'initialized': 'never'
|
||||
// }],
|
||||
// 'operator-linebreak': [2, 'after', {
|
||||
// 'overrides': {
|
||||
// '?': 'before',
|
||||
// ':': 'before'
|
||||
// }
|
||||
// }],
|
||||
// 'padded-blocks': [2, 'never'],
|
||||
// 'quotes': [2, 'single', {
|
||||
// 'avoidEscape': true,
|
||||
// 'allowTemplateLiterals': true
|
||||
// }],
|
||||
// 'semi': [2, 'never'],
|
||||
// 'semi-spacing': [2, {
|
||||
// 'before': false,
|
||||
// 'after': true
|
||||
// }],
|
||||
// 'space-before-blocks': [2, 'always'],
|
||||
// 'space-before-function-paren': [2, 'never'],
|
||||
// 'space-in-parens': [2, 'never'],
|
||||
// 'space-infix-ops': 2,
|
||||
// 'space-unary-ops': [2, {
|
||||
// 'words': true,
|
||||
// 'nonwords': false
|
||||
// }],
|
||||
// 'spaced-comment': [2, 'always', {
|
||||
// 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
|
||||
// }],
|
||||
// 'template-curly-spacing': [2, 'never'],
|
||||
// 'use-isnan': 2,
|
||||
// 'valid-typeof': 2,
|
||||
// 'wrap-iife': [2, 'any'],
|
||||
// 'yield-star-spacing': [2, 'both'],
|
||||
// 'yoda': [2, 'never'],
|
||||
// 'prefer-const': 2,
|
||||
// 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
||||
// 'object-curly-spacing': [2, 'always', {
|
||||
// objectsInObjects: false
|
||||
// }],
|
||||
// 'array-bracket-spacing': [2, 'never']
|
||||
// }
|
||||
// }
|
||||
|
@@ -29,14 +29,14 @@
|
||||
<el-table-column
|
||||
label="物料名称"
|
||||
min-width="120"
|
||||
align="left"
|
||||
align="center"
|
||||
key="itemName"
|
||||
prop="itemName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="left"
|
||||
align="center"
|
||||
key="specification"
|
||||
prop="specification"
|
||||
:show-overflow-tooltip="true"
|
||||
@@ -48,7 +48,7 @@
|
||||
prop="unitOfMeasure"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="物料/产品"
|
||||
align="center"
|
||||
key="itemOrProduct"
|
||||
@@ -68,7 +68,7 @@
|
||||
key="itemTypeName"
|
||||
prop="itemTypeName"
|
||||
width="120"
|
||||
/>
|
||||
/> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
if (row) {
|
||||
this.selectedRow = row;
|
||||
this.$emit("onSelected", this.selectedRow);
|
||||
this.$emit('cancels', null)
|
||||
this.$emit("cancels", null);
|
||||
}
|
||||
},
|
||||
// 单选选中数据
|
||||
@@ -186,11 +186,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.$emit("onSelected", this.selectedRow);
|
||||
this.$emit('cancels', null)
|
||||
this.$emit("cancels", null);
|
||||
},
|
||||
clear() {
|
||||
this.$emit('cancels', null)
|
||||
}
|
||||
this.$emit("cancels", null);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -60,18 +60,19 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="生产炉号" prop="machineryName">
|
||||
<el-input
|
||||
v-model="queryParams.machineryName"
|
||||
placeholder="请输入生产炉号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@@ -91,11 +92,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 2024 12 19 需求五 -->
|
||||
<el-table-column label="炉号" width="180" prop="machineryName">
|
||||
</el-table-column>
|
||||
<el-table-column label="炉号" width="180" prop="machineryName"> </el-table-column>
|
||||
<!-- 2024 12 19 需求五 -->
|
||||
<el-table-column label="班组" width="180" prop="teamName">
|
||||
</el-table-column>
|
||||
<el-table-column label="班组" width="180" prop="teamName"> </el-table-column>
|
||||
<el-table-column label="工单编码" width="180" prop="workorderCode">
|
||||
</el-table-column>
|
||||
<!-- 2024 12 19 需求五 仅注释html,js部分不动,以便随时恢复 -->
|
||||
@@ -121,12 +120,7 @@
|
||||
align="center"
|
||||
prop="sourceCode"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="产品编号"
|
||||
width="120"
|
||||
align="center"
|
||||
prop="productCode"
|
||||
/>
|
||||
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
width="200"
|
||||
@@ -150,12 +144,7 @@
|
||||
prop="clientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="需求日期"
|
||||
align="center"
|
||||
prop="requestDate"
|
||||
width="180"
|
||||
>
|
||||
<el-table-column label="需求日期" align="center" prop="requestDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
|
@@ -9,13 +9,7 @@
|
||||
<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="文档地址" effect="dark" placement="bottom">
|
||||
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
|
@@ -54,7 +54,7 @@ export function resetForm(refName) {
|
||||
}
|
||||
|
||||
// 添加日期范围
|
||||
export function addDateRange(params, dateRange, propName) {
|
||||
export function addDateRange(params, dateRange, propName ,Time) {
|
||||
let search = params;
|
||||
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
|
||||
dateRange = Array.isArray(dateRange) ? dateRange : [];
|
||||
@@ -65,6 +65,7 @@ export function addDateRange(params, dateRange, propName) {
|
||||
search.params['begin' + propName] = dateRange[0];
|
||||
search.params['end' + propName] = dateRange[1];
|
||||
}
|
||||
console.log(search)
|
||||
return search;
|
||||
}
|
||||
|
||||
|
@@ -308,7 +308,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs type="border-card" v-if="form.itemId != null">
|
||||
<!-- <el-tabs type="border-card" v-if="form.itemId != null">
|
||||
<el-tab-pane label="BOM组成">
|
||||
<ItemBom :optType="optType" :itemId="form.itemId"></ItemBom>
|
||||
</el-tab-pane>
|
||||
@@ -318,7 +318,7 @@
|
||||
<el-tab-pane label="SOP">
|
||||
<SOPTab :itemId="form.itemId" :optType="optType"></SOPTab>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tabs> -->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
||||
|
@@ -1,8 +1,19 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="报工类型" prop="feedbackType">
|
||||
<el-select v-model="queryParams.feedbackType" placeholder="请选择报工类型" clearable>
|
||||
<el-select
|
||||
v-model="queryParams.feedbackType"
|
||||
placeholder="请选择报工类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_feedback_type"
|
||||
:key="dict.value"
|
||||
@@ -69,8 +80,21 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报工时间" prop="recptDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -83,7 +107,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:pro:feedback:add']"
|
||||
>新增</el-button>
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -94,7 +119,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:pro:feedback:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -105,27 +131,55 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:pro:feedback:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="feedbackList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="报工类型" align="center" prop="feedbackType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_feedback_type" :value="scope.row.feedbackType"/>
|
||||
<dict-tag
|
||||
:options="dict.type.mes_feedback_type"
|
||||
:value="scope.row.feedbackType"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作站" width="120px" align="center" prop="workstationName" />
|
||||
<el-table-column label="生产工单编号" width="150px" align="center" prop="workorderCode" />
|
||||
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
|
||||
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" />
|
||||
<el-table-column
|
||||
label="工作站"
|
||||
width="120px"
|
||||
align="center"
|
||||
prop="workstationName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产工单编号"
|
||||
width="150px"
|
||||
align="center"
|
||||
prop="workorderCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品物料编码"
|
||||
width="120px"
|
||||
align="center"
|
||||
prop="itemCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品物料名称"
|
||||
width="150px"
|
||||
align="center"
|
||||
prop="itemName"
|
||||
/>
|
||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||
<el-table-column label="报工数量" align="center" prop="quantityFeedback" />
|
||||
<el-table-column label="报工人" align="center" prop="nickName" />
|
||||
<el-table-column label="报工时间" align="center" prop="feedbackTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.feedbackTime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.feedbackTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核人" align="center" prop="recordNick" />
|
||||
@@ -134,7 +188,12 @@
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="100px"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -142,7 +201,8 @@
|
||||
icon="el-icon-query"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:feedback:query']"
|
||||
>查看</el-button>
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -150,7 +210,8 @@
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:feedback:edit']"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -158,7 +219,8 @@
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:pro:feedback:remove']"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -190,18 +252,34 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产工单" prop="workorderCode">
|
||||
<el-input v-model="form.workorderCode" placeholder="请选择生产工单">
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleWorkorderSelect"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="handleWorkorderSelect"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
||||
<WorkorderSelect
|
||||
ref="woSelect"
|
||||
@onSelected="onWorkorderSelected"
|
||||
></WorkorderSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产任务" prop="taskCode">
|
||||
<el-input v-model="form.taskCode" placeholder="请选择生产任务">
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleTaskSelect"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="handleTaskSelect"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<ProtaskSelect ref="taskSelect" :workorderId="form.workorderId" @onSelected="onTaskSelected"> </ProtaskSelect>
|
||||
<ProtaskSelect
|
||||
ref="taskSelect"
|
||||
:workorderId="form.workorderId"
|
||||
@onSelected="onTaskSelected"
|
||||
>
|
||||
</ProtaskSelect>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@@ -224,7 +302,11 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="规格型号" prop="specification">
|
||||
<el-input v-model="form.specification" type="textarea" readonly="readonly" />
|
||||
<el-input
|
||||
v-model="form.specification"
|
||||
type="textarea"
|
||||
readonly="readonly"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -236,12 +318,22 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合格品数量" prop="quantityQualified">
|
||||
<el-input-number :min="0" @change="handleQuantityChanged" v-model="form.quantityQualified" placeholder="请输入合格品数量" />
|
||||
<el-input-number
|
||||
:min="0"
|
||||
@change="handleQuantityChanged"
|
||||
v-model="form.quantityQualified"
|
||||
placeholder="请输入合格品数量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="不良品数量" prop="quantityUnquanlified">
|
||||
<el-input-number :min="0" @change="handleQuantityChanged" v-model="form.quantityUnquanlified" placeholder="请输入不良品数量" />
|
||||
<el-input-number
|
||||
:min="0"
|
||||
@change="handleQuantityChanged"
|
||||
v-model="form.quantityUnquanlified"
|
||||
placeholder="请输入不良品数量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -253,7 +345,12 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="待检测数量" prop="quantityUncheck">
|
||||
<el-input-number :min="0" @change="handleQuantityChanged" v-model="form.quantityUncheck" placeholder="请输入待检测数量" />
|
||||
<el-input-number
|
||||
:min="0"
|
||||
@change="handleQuantityChanged"
|
||||
v-model="form.quantityUncheck"
|
||||
placeholder="请输入待检测数量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -261,28 +358,44 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报工人" prop="nickName">
|
||||
<el-input v-model="form.nickName" placeholder="请选择报工人">
|
||||
<el-button slot="append" @click="handleUserSelect" icon="el-icon-search"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleUserSelect"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
||||
<UserSingleSelect
|
||||
ref="userSelect"
|
||||
@onSelected="onUserSelected"
|
||||
></UserSingleSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="报工时间" prop="feedbackTime">
|
||||
<el-date-picker clearable
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.feedbackTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择报工时间">
|
||||
placeholder="请选择报工时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="审核人" prop="recordNick">
|
||||
<el-input v-model="form.recordNick" placeholder="请选择审核人">
|
||||
<el-button slot="append" @click="handleUser2Select" icon="el-icon-search"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleUser2Select"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<UserSingleSelect ref="user2Select" @onSelected="onUser2Selected"></UserSingleSelect>
|
||||
<UserSingleSelect
|
||||
ref="user2Select"
|
||||
@onSelected="onUser2Selected"
|
||||
></UserSingleSelect>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@@ -294,11 +407,36 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
||||
<el-button type="primary" @click="handleSubmit" v-if="form.status =='PREPARE' && optType !='view' && form.recordId !=null ">提交审批</el-button>
|
||||
<el-button type="success" @click="handleExecute" v-if="form.status =='APPROVING' && form.recordId !=null">审批通过</el-button>
|
||||
<el-button type="danger" @click="handleReject" v-if="form.status =='APPROVING' && form.recordId !=null">审批不通过</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view' && form.recordId != null"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="handleExecute"
|
||||
v-if="form.status == 'APPROVING' && form.recordId != null"
|
||||
>审批通过</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
@click="handleReject"
|
||||
v-if="form.status == 'APPROVING' && form.recordId != null"
|
||||
>审批不通过</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -306,15 +444,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listFeedback, getFeedback, delFeedback, addFeedback, updateFeedback, execute } from "@/api/mes/pro/feedback";
|
||||
import WorkorderSelect from "@/components/workorderSelect/single.vue"
|
||||
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"
|
||||
import UserSingleSelect from "@/components/userSelect/single.vue"
|
||||
import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue"
|
||||
import {
|
||||
listFeedback,
|
||||
getFeedback,
|
||||
delFeedback,
|
||||
addFeedback,
|
||||
updateFeedback,
|
||||
execute,
|
||||
} from "@/api/mes/pro/feedback";
|
||||
import WorkorderSelect from "@/components/workorderSelect/single.vue";
|
||||
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
|
||||
import UserSingleSelect from "@/components/userSelect/single.vue";
|
||||
import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue";
|
||||
export default {
|
||||
name: "Feedback",
|
||||
components: { WorkorderSelect, WorkstationSelect, UserSingleSelect, ProtaskSelect },
|
||||
dicts: ['mes_order_status', 'mes_feedback_type'],
|
||||
dicts: ["mes_order_status", "mes_feedback_type"],
|
||||
data() {
|
||||
return {
|
||||
optType: undefined,
|
||||
@@ -366,26 +511,19 @@ export default {
|
||||
recordNick: null,
|
||||
status: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
feedbackType: [
|
||||
{ required: true, message: "报工类型不能为空", trigger: "change" }
|
||||
{ required: true, message: "报工类型不能为空", trigger: "change" },
|
||||
],
|
||||
taskCode: [
|
||||
{ required: true, message: "请选择生产任务", trigger: "blur" }
|
||||
],
|
||||
workorderCode: [
|
||||
{ required: true, message: "生产工单不能为空", trigger: "blur" }
|
||||
],
|
||||
nickName: [
|
||||
{ required: true, message: "请选择报工人", trigger: "blur"}
|
||||
],
|
||||
feedbackTime: [
|
||||
{ required: true, message: "请选择报工时间", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
taskCode: [{ required: true, message: "请选择生产任务", trigger: "blur" }],
|
||||
workorderCode: [{ required: true, message: "生产工单不能为空", trigger: "blur" }],
|
||||
nickName: [{ required: true, message: "请选择报工人", trigger: "blur" }],
|
||||
feedbackTime: [{ required: true, message: "请选择报工时间", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -395,11 +533,13 @@ export default {
|
||||
/** 查询生产报工记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listFeedback(this.queryParams).then(response => {
|
||||
listFeedback(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
this.feedbackList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@@ -448,12 +588,15 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
handleQuantityChanged() {
|
||||
this.form.quantityFeedback = this.form.quantityQualified + this.form.quantityUnquanlified + this.form.quantityUncheck;
|
||||
this.form.quantityFeedback =
|
||||
this.form.quantityQualified +
|
||||
this.form.quantityUnquanlified +
|
||||
this.form.quantityUncheck;
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@@ -462,14 +605,15 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.recordId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.recordId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@@ -481,8 +625,8 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getFeedback(recordId).then(response => {
|
||||
const recordId = row.recordId || this.ids;
|
||||
getFeedback(recordId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改生产报工记录";
|
||||
@@ -493,7 +637,7 @@ export default {
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids;
|
||||
getFeedback(recordId).then(response => {
|
||||
getFeedback(recordId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看生产报工单信息";
|
||||
@@ -502,17 +646,16 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
updateFeedback(this.form).then(response => {
|
||||
updateFeedback(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
});
|
||||
} else {
|
||||
addFeedback(this.form).then(response => {
|
||||
addFeedback(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -522,11 +665,11 @@ export default {
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.status = "APPROVING";
|
||||
if (this.form.recordId != null) {
|
||||
updateFeedback(this.form).then(response => {
|
||||
updateFeedback(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("提交成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -538,19 +681,23 @@ export default {
|
||||
//审批通过执行
|
||||
handleExecute() {
|
||||
const recordIds = this.form.recordId;
|
||||
this.$modal.confirm('确认执行报工?').then(function() {
|
||||
return execute(recordIds)//执行报工
|
||||
}).then(() => {
|
||||
this.$modal
|
||||
.confirm("确认执行报工?")
|
||||
.then(function () {
|
||||
return execute(recordIds); //执行报工
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("执行成功");
|
||||
this.open = false;
|
||||
}).catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//审批不通过,拒绝
|
||||
handleReject() {
|
||||
this.form.status = "PREPARE";
|
||||
if (this.form.recordId != null) {
|
||||
updateFeedback(this.form).then(response => {
|
||||
updateFeedback(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("提交成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -560,18 +707,26 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recordIds = row.recordId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产报工记录编号为"' + recordIds + '"的数据项?').then(function() {
|
||||
this.$modal
|
||||
.confirm('是否确认删除生产报工记录编号为"' + recordIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delFeedback(recordIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/feedback/export', {
|
||||
...this.queryParams
|
||||
}, `feedback_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"mes/pro/feedback/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`feedback_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//选择生产工单
|
||||
handleWorkorderSelect() {
|
||||
@@ -608,7 +763,7 @@ export default {
|
||||
this.form.routeId = row.routeId;
|
||||
this.form.routeCode = row.routeCode;
|
||||
this.form.isCheck = row.isCheck;
|
||||
if(row.isCheck == 'N'){
|
||||
if (row.isCheck == "N") {
|
||||
this.form.quantityUncheck = 0;
|
||||
} else {
|
||||
this.form.quantityQualified = 0;
|
||||
@@ -634,6 +789,6 @@ export default {
|
||||
this.form.recordUser = row.userName;
|
||||
this.form.recordNick = row.nickName;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,65 +1,202 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
>
|
||||
<el-form-item label="工单编码" prop="workorderCode">
|
||||
<el-input v-model="queryParams.workorderCode" placeholder="请输入工单编码" clearable style="width: 240px" @keyup.enter.native="handleQuery"/>
|
||||
<el-input
|
||||
v-model="queryParams.workorderCode"
|
||||
placeholder="请输入工单编码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单名称" prop="workorderName">
|
||||
<el-input v-model="queryParams.workorderName" placeholder="请输入工单名称" clearable style="width: 240px" @keyup.enter.native="handleQuery"/>
|
||||
<el-input
|
||||
v-model="queryParams.workorderName"
|
||||
placeholder="请输入工单名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品编码" prop="productCode">
|
||||
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable style="width: 240px" @keyup.enter.native="handleQuery"/>
|
||||
<el-input
|
||||
v-model="queryParams.productCode"
|
||||
placeholder="请输入产品编码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="productName">
|
||||
<el-input v-model="queryParams.productName" placeholder="请输入产品名称" clearable style="width: 240px" @keyup.enter.native="handleQuery"/>
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入产品名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="machineryName">
|
||||
<el-input v-model="queryParams.machineryName" placeholder="请输入设备名称" clearable style="width: 240px" @keyup.enter.native="handleQuery"/>
|
||||
<el-input
|
||||
v-model="queryParams.machineryName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产状态" prop="jobStatus">
|
||||
<el-select v-model="queryParams.jobStatus" placeholder="生产状态" clearable style="width: 240px">
|
||||
<el-option v-for="dict in jobStatusOptions" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
<el-select
|
||||
v-model="queryParams.jobStatus"
|
||||
placeholder="生产状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in jobStatusOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="需求日期" prop="recptDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['mes:pro:machineryJob:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:pro:machineryJob:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="序号" type="index" width="80" align="center" :index="indexMethod"/>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80"
|
||||
align="center"
|
||||
:index="indexMethod"
|
||||
/>
|
||||
<el-table-column label="作业编码" prop="jobCode" align="center" width="150" />
|
||||
<el-table-column label="工单编码" prop="workorderCode" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="工单名称" prop="workorderName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" prop="machineryCode" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备名称" prop="machineryName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="工单编码"
|
||||
prop="workorderCode"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="工单名称"
|
||||
prop="workorderName"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
prop="machineryCode"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
prop="machineryName"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="生产状态" prop="jobStatus" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="danger" v-if="scope.row.jobStatus === 'WORKING'">进行中</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.jobStatus === 'FINISHED'">已完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="天然气用量" prop="gasCost" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="产品编码" prop="productCode" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="产品名称" prop="productName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="需求日期" prop="requestDate" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="天然气用量"
|
||||
prop="gasCost"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品编码"
|
||||
prop="productCode"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="productName"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="需求日期"
|
||||
prop="requestDate"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" v-hasPermi="['mes:pro:machineryJob:view']">查看</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['mes:pro:machineryJob:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:machineryJob:view']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:pro:machineryJob:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 查看详情对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1080px" append-to-body>
|
||||
@@ -67,56 +204,99 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称">
|
||||
<el-input v-model="form.machineryName" placeholder="设备名称" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.machineryName"
|
||||
placeholder="设备名称"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="当前作业进度">
|
||||
<el-input v-model="form.jobProgressName" placeholder="当前作业进度" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.jobProgressName"
|
||||
placeholder="当前作业进度"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="form.workorderCode" placeholder="工单编码" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.workorderCode"
|
||||
placeholder="工单编码"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工单名称">
|
||||
<el-input v-model="form.workorderName" placeholder="工单名称" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.workorderName"
|
||||
placeholder="工单名称"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品编码">
|
||||
<el-input v-model="form.productCode" placeholder="产品编码" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.productCode"
|
||||
placeholder="产品编码"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品名称">
|
||||
<el-input v-model="form.productName" placeholder="产品名称" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.productName"
|
||||
placeholder="产品名称"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户编码">
|
||||
<el-input v-model="form.clientCode" placeholder="客户编码" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.clientCode"
|
||||
placeholder="客户编码"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称">
|
||||
<el-input v-model="form.clientName" placeholder="客户名称" :readonly="operable"/>
|
||||
<el-input
|
||||
v-model="form.clientName"
|
||||
placeholder="客户名称"
|
||||
:readonly="operable"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="生产状态">
|
||||
<el-select v-model="form.jobStatus" placeholder="生产状态" clearable style="width: 100%" :readonly="operable">
|
||||
<el-option v-for="dict in jobStatusOptions" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
<el-select
|
||||
v-model="form.jobStatus"
|
||||
placeholder="生产状态"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:readonly="operable"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in jobStatusOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -124,7 +304,12 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :readonly="operable"></el-input>
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
:readonly="operable"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -133,16 +318,50 @@
|
||||
<el-col :span="24">
|
||||
<el-table :data="form.progressList">
|
||||
<el-table-column label="序号" type="index" width="80" align="center" />
|
||||
<el-table-column label="流程名称" prop="progressName" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="流程编码" prop="progressCode" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="开始时间" prop="startTime" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="完成时间" prop="endTime" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作人" prop="operBy" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作时间" prop="operTime" align="center" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="流程名称"
|
||||
prop="progressName"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="流程编码"
|
||||
prop="progressCode"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
prop="startTime"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="完成时间"
|
||||
prop="endTime"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作人"
|
||||
prop="operBy"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作时间"
|
||||
prop="operTime"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="结果" prop="progressResult" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="danger" v-if="scope.row.progressResult == '0'">不合格</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.progressResult == '1'">合格</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.progressResult == '0'"
|
||||
>不合格</el-tag
|
||||
>
|
||||
<el-tag type="success" v-if="scope.row.progressResult == '1'"
|
||||
>合格</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -157,7 +376,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listProgress, getProgressByJobId, deleteProgress} from "@/api/mes/pro/machineryJob";
|
||||
import {
|
||||
listProgress,
|
||||
getProgressByJobId,
|
||||
deleteProgress,
|
||||
} from "@/api/mes/pro/machineryJob";
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
@@ -189,10 +412,11 @@ export default {
|
||||
jobStatusOptions: [
|
||||
{
|
||||
value: "WORKING",
|
||||
label: "进行中"
|
||||
}, {
|
||||
label: "进行中",
|
||||
},
|
||||
{
|
||||
value: "FINISHED",
|
||||
label: "已完成"
|
||||
label: "已完成",
|
||||
},
|
||||
],
|
||||
// 查询参数
|
||||
@@ -209,7 +433,7 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -219,12 +443,17 @@ export default {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProgress(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
listProgress({
|
||||
...this.queryParams,
|
||||
|
||||
startTime: this.dateRange[0],
|
||||
endTime: this.dateRange[1],
|
||||
|
||||
}).then((response) => {
|
||||
this.tableList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@@ -261,21 +490,21 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.jobId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.jobId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 序号 */
|
||||
indexMethod(index) {
|
||||
let pageNum = this.queryParams.pageNum
|
||||
let pageSize = this.queryParams.pageSize
|
||||
return (index + 1) + (pageNum - 1) * pageSize
|
||||
let pageNum = this.queryParams.pageNum;
|
||||
let pageSize = this.queryParams.pageSize;
|
||||
return index + 1 + (pageNum - 1) * pageSize;
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const jobId = row.jobId || this.ids
|
||||
getProgressByJobId(jobId).then(response => {
|
||||
const jobId = row.jobId || this.ids;
|
||||
getProgressByJobId(jobId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.operable = true;
|
||||
this.open = true;
|
||||
@@ -285,20 +514,27 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const jobId = row.jobId || this.ids;
|
||||
this.$modal.confirm('是否确认删除作业编码为"' + row.jobCode + '"的数据项?').then(function () {
|
||||
this.$modal
|
||||
.confirm('是否确认删除作业编码为"' + row.jobCode + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteProgress(jobId);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/machineryJob/exportExcel', {
|
||||
...this.queryParams
|
||||
}, `生产记录.xlsx`)
|
||||
}
|
||||
}
|
||||
this.download(
|
||||
"mes/pro/machineryJob/exportExcel",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`生产记录.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
>
|
||||
<el-form-item label="月份" prop="reportMonth">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
@@ -13,20 +19,40 @@
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['mes:pro:monthReport:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:pro:monthReport:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="序号" type="index" width="80" align="center" :index="indexMethod"/>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80"
|
||||
align="center"
|
||||
:index="indexMethod"
|
||||
/>
|
||||
<el-table-column label="月份" prop="reportMonth" align="center" width="150" />
|
||||
<el-table-column label="原料(吨)" prop="itemQuantity" align="center" />
|
||||
<el-table-column label="成品(吨)" prop="productQuantity" align="center" />
|
||||
@@ -41,19 +67,41 @@
|
||||
<el-table-column label="锌锭销量(吨)" prop="xdSale" align="center" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)" v-hasPermi="['mes:pro:monthReport:edit']">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['mes:pro:monthReport:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList"/>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-dialog title="编辑" :visible.sync="open" width="680px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="机修房电消耗" prop="machinePower">
|
||||
<el-input-number :min="0" v-model="form.machinePower" placeholder="请输入机修房电消耗"/>
|
||||
<!-- <el-input-number
|
||||
:min="0"
|
||||
v-model="form.machinePower"
|
||||
placeholder="请输入机修房电消耗"
|
||||
/> -->
|
||||
|
||||
<el-input
|
||||
v-model="form.machinePower"
|
||||
placeholder="请输入机修房电消耗"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -102,9 +150,10 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
machinePower: [
|
||||
{ required: true, message: "机修房电消耗不能为空", trigger: "blur" }
|
||||
{ required: true, message: "机修房电消耗不能为空", trigger: "blur" },
|
||||
{ pattern: /^[0-9]+(\.[0-9]+)?$/, message: "请输入数字", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -114,12 +163,11 @@ export default {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
list(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||
this.tableList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@@ -127,13 +175,13 @@ export default {
|
||||
this.reset();
|
||||
},
|
||||
confirm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
edit(this.form).then(response => {
|
||||
this.$modal.msgSuccess("操作成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
edit(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -158,30 +206,34 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.jobId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.jobId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 序号 */
|
||||
indexMethod(index) {
|
||||
let pageNum = this.queryParams.pageNum
|
||||
let pageSize = this.queryParams.pageSize
|
||||
return (index + 1) + (pageNum - 1) * pageSize
|
||||
let pageNum = this.queryParams.pageNum;
|
||||
let pageSize = this.queryParams.pageSize;
|
||||
return index + 1 + (pageNum - 1) * pageSize;
|
||||
},
|
||||
/** 编辑按钮操作 */
|
||||
handleEdit(row) {
|
||||
this.form = {
|
||||
id: row.id,
|
||||
machinePower: row.machinePower,
|
||||
}
|
||||
this.open = true
|
||||
};
|
||||
this.open = true;
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/monthReport/exportExcel', {
|
||||
...this.queryParams
|
||||
}, `生产月报表.xlsx`)
|
||||
}
|
||||
}
|
||||
this.download(
|
||||
"mes/pro/monthReport/exportExcel",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`生产月报表.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="工序编码" prop="processCode">
|
||||
<el-input
|
||||
v-model="queryParams.processCode"
|
||||
@@ -25,8 +32,21 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="需求日期" prop="requestDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -40,7 +60,8 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:pro:process:add']"
|
||||
>新增</el-button>
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -51,7 +72,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:pro:process:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -62,7 +84,8 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:pro:process:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -72,12 +95,17 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:pro:process:export']"
|
||||
>导出</el-button>
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="processList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="processList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="工序编码" align="center" prop="processCode">
|
||||
<template slot-scope="scope">
|
||||
@@ -85,16 +113,27 @@
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:query']"
|
||||
>{{scope.row.processCode}}</el-button>
|
||||
>{{ scope.row.processCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" align="center" prop="processName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="工序名称"
|
||||
align="center"
|
||||
prop="processName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="是否启用" align="center" prop="enableFlag">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -103,14 +142,16 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:edit']"
|
||||
>修改</el-button>
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:pro:process:remove']"
|
||||
>删除</el-button>
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -134,10 +175,13 @@
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag"
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -153,14 +197,16 @@
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="form.enableFlag" v-else>
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -168,7 +214,11 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工序说明" prop="attention">
|
||||
<el-input v-model="form.attention" type="textarea" placeholder="请输入内容" />
|
||||
<el-input
|
||||
v-model="form.attention"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -180,10 +230,18 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider content-position="center" v-if="form.processId !=null">操作步骤</el-divider>
|
||||
<Processcontent v-if="form.processId !=null" :optType="optType" :processId="form.processId"></Processcontent>
|
||||
<el-divider content-position="center" v-if="form.processId != null"
|
||||
>操作步骤</el-divider
|
||||
>
|
||||
<Processcontent
|
||||
v-if="form.processId != null"
|
||||
:optType="optType"
|
||||
:processId="form.processId"
|
||||
></Processcontent>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view'">返回</el-button>
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submitForm" v-else>确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
@@ -192,12 +250,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProcess, getProcess, delProcess, addProcess, updateProcess } from "@/api/mes/pro/process";
|
||||
import {
|
||||
listProcess,
|
||||
getProcess,
|
||||
delProcess,
|
||||
addProcess,
|
||||
updateProcess,
|
||||
} from "@/api/mes/pro/process";
|
||||
import Processcontent from "./content.vue";
|
||||
import {genCode} from "@/api/system/autocode/rule"
|
||||
import { genCode } from "@/api/system/autocode/rule";
|
||||
export default {
|
||||
name: "Process",
|
||||
dicts: ['sys_yes_no'],
|
||||
dicts: ["sys_yes_no"],
|
||||
components: { Processcontent },
|
||||
data() {
|
||||
return {
|
||||
@@ -230,20 +294,15 @@ export default {
|
||||
processName: null,
|
||||
enableFlag: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
processCode: [
|
||||
{ required: true, message: "工序编码不能为空", trigger: "blur" }
|
||||
],
|
||||
processName: [
|
||||
{ required: true, message: "工序名称不能为空", trigger: "blur" }
|
||||
],
|
||||
enableFlag: [
|
||||
{ required: true, message: "是否启用不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
processCode: [{ required: true, message: "工序编码不能为空", trigger: "blur" }],
|
||||
processName: [{ required: true, message: "工序名称不能为空", trigger: "blur" }],
|
||||
enableFlag: [{ required: true, message: "是否启用不能为空", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -253,7 +312,7 @@ export default {
|
||||
/** 查询生产工序列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProcess(this.queryParams).then(response => {
|
||||
listProcess(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||
this.processList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@@ -271,12 +330,12 @@ export default {
|
||||
processCode: null,
|
||||
processName: null,
|
||||
attention: null,
|
||||
enableFlag: 'Y',
|
||||
enableFlag: "Y",
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.resetForm("form");
|
||||
@@ -293,9 +352,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.processId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.processId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@@ -308,7 +367,7 @@ export default {
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const processId = row.processId || this.ids;
|
||||
getProcess(processId).then(response => {
|
||||
getProcess(processId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看工序信息";
|
||||
@@ -318,8 +377,8 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const processId = row.processId || this.ids
|
||||
getProcess(processId).then(response => {
|
||||
const processId = row.processId || this.ids;
|
||||
getProcess(processId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改生产工序";
|
||||
@@ -328,16 +387,16 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.processId != null) {
|
||||
updateProcess(this.form).then(response => {
|
||||
updateProcess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProcess(this.form).then(response => {
|
||||
addProcess(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -349,29 +408,37 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const processIds = row.processId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产工序?').then(function() {
|
||||
this.$modal
|
||||
.confirm("是否确认删除生产工序?")
|
||||
.then(function () {
|
||||
return delProcess(processIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/process/export', {
|
||||
...this.queryParams
|
||||
}, `生产工序数据.xlsx`)
|
||||
this.download(
|
||||
"mes/pro/process/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`生产工序数据.xlsx`
|
||||
);
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('PROCESS_CODE').then(response =>{
|
||||
genCode("PROCESS_CODE").then((response) => {
|
||||
this.form.processCode = response;
|
||||
});
|
||||
} else {
|
||||
this.form.processCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="工单编码" prop="workorderCode">
|
||||
<el-input
|
||||
v-model="queryParams.workorderCode"
|
||||
@@ -60,20 +67,37 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="需求日期" prop="requestDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.requestDate"
|
||||
type="date"
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择需求日期">
|
||||
</el-date-picker>
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-refresh" v-hasPermi="['mes:pro:protask:list']" circle="" @click="getList"></el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" v-hasPermi="['mes:pro:protask:edit']" circle="" @click="handleOpenGantt"></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh"
|
||||
v-hasPermi="['mes:pro:protask:list']"
|
||||
circle=""
|
||||
@click="getList"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['mes:pro:protask:edit']"
|
||||
circle=""
|
||||
@click="handleOpenGantt"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="wrapper">
|
||||
@@ -95,28 +119,59 @@
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:pro:protask:query']"
|
||||
>{{scope.row.workorderCode}}</el-button>
|
||||
>{{ scope.row.workorderCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工单名称" width="200" align="center" prop="workorderName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="工单名称"
|
||||
width="200"
|
||||
align="center"
|
||||
prop="workorderName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="工单来源" align="center" prop="orderSource">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_workorder_sourcetype" :value="scope.row.orderSource"/>
|
||||
<dict-tag
|
||||
:options="dict.type.mes_workorder_sourcetype"
|
||||
:value="scope.row.orderSource"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单编号" width="140" align="center" prop="sourceCode" />
|
||||
<el-table-column label="产品编号" width="120" align="center" prop="productCode" />
|
||||
<el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
width="200"
|
||||
align="center"
|
||||
prop="productName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="productSpc"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||
<el-table-column label="工单数量" align="center" prop="quantity" />
|
||||
<el-table-column label="调整数量" align="center" prop="quantityChanged" />
|
||||
<el-table-column label="已生产数量" align="center" width="100px" prop="quantityProduced" />
|
||||
<el-table-column
|
||||
label="已生产数量"
|
||||
align="center"
|
||||
width="100px"
|
||||
prop="quantityProduced"
|
||||
/>
|
||||
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||
<el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="客户名称"
|
||||
align="center"
|
||||
prop="clientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="需求日期" align="center" prop="requestDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.requestDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排产状态" align="center" prop="status">
|
||||
@@ -124,7 +179,12 @@
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -133,7 +193,8 @@
|
||||
v-if="scope.row.status == 'CONFIRMED'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:protask:edit']"
|
||||
>排产</el-button>
|
||||
>排产</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -169,7 +230,8 @@
|
||||
v-for="dict in dict.type.mes_workorder_sourcetype"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -194,8 +256,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品编号" prop="productCode">
|
||||
<el-input v-model="form.productCode" readonly="readonly" >
|
||||
</el-input>
|
||||
<el-input v-model="form.productCode" readonly="readonly"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -224,11 +285,13 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="需求日期" prop="requestDate">
|
||||
<el-date-picker disabled
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.requestDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择需求日期">
|
||||
placeholder="请选择需求日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -236,8 +299,7 @@
|
||||
<el-row v-if="form.orderSource == 'ORDER'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户编号" prop="clientCode">
|
||||
<el-input v-model="form.clientCode" readonly="readonly" >
|
||||
</el-input>
|
||||
<el-input v-model="form.clientCode" readonly="readonly"> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -255,18 +317,51 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-steps :active="activeProcess" v-if="form.workorderId !=null" align-center simple>
|
||||
<el-step v-for="(item,index) in processOptions"
|
||||
:title="item.processName" @click.native="handleStepClick(index)">
|
||||
<el-steps
|
||||
:active="activeProcess"
|
||||
v-if="form.workorderId != null"
|
||||
align-center
|
||||
simple
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) in processOptions"
|
||||
:title="item.processName"
|
||||
@click.native="handleStepClick(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
<el-card v-for=" (item,index) in processOptions " :key="index" v-if="activeProcess == index && form.workorderId !=null">
|
||||
<ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType"></ProTask>
|
||||
<el-card
|
||||
v-for="(item, index) in processOptions"
|
||||
:key="index"
|
||||
v-if="activeProcess == index && form.workorderId != null"
|
||||
>
|
||||
<ProTask
|
||||
:workorderId="form.workorderId"
|
||||
:routeId="item.routeId"
|
||||
:processId="item.processId"
|
||||
:colorCode="item.colorCode"
|
||||
:optType="optType"
|
||||
></ProTask>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">确 定</el-button>
|
||||
<el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view' && form.workorderId !=null">完成</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="handleFinish"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view' && form.workorderId != null"
|
||||
>完成</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -274,7 +369,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWorkorder, getWorkorder, delWorkorder, addWorkorder, updateWorkorder } from "@/api/mes/pro/workorder";
|
||||
import {
|
||||
listWorkorder,
|
||||
getWorkorder,
|
||||
delWorkorder,
|
||||
addWorkorder,
|
||||
updateWorkorder,
|
||||
} from "@/api/mes/pro/workorder";
|
||||
import { listGanttTaskList } from "@/api/mes/pro/protask";
|
||||
import { listProductprocess } from "@/api/mes/pro/routeprocess";
|
||||
import ProTask from "./proTask.vue";
|
||||
@@ -284,11 +385,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Workorder",
|
||||
dicts: ['mes_order_status','mes_workorder_sourcetype'],
|
||||
dicts: ["mes_order_status", "mes_workorder_sourcetype"],
|
||||
components: {
|
||||
Treeselect,
|
||||
ProTask,
|
||||
GanttChar
|
||||
GanttChar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -322,7 +423,7 @@ export default {
|
||||
pageSize: 10,
|
||||
workorderCode: null,
|
||||
workorderName: null,
|
||||
workorderType: 'SELF', //这里的排产要排除自产之外的外协和外购
|
||||
workorderType: "SELF", //这里的排产要排除自产之外的外协和外购
|
||||
orderSource: null,
|
||||
sourceCode: null,
|
||||
productId: null,
|
||||
@@ -340,11 +441,12 @@ export default {
|
||||
requestDate: null,
|
||||
parentId: null,
|
||||
ancestors: null,
|
||||
status: 'CONFIRMED',
|
||||
status: "CONFIRMED",
|
||||
},
|
||||
dateRange: [],
|
||||
tasks: {
|
||||
data: [],
|
||||
links: []
|
||||
links: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -358,17 +460,19 @@ export default {
|
||||
/** 查询生产工单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWorkorder(this.queryParams).then(response => {
|
||||
listWorkorder(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
this.workorderList = this.handleTree(response.rows, "workorderId", "parentId");
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
handleOpenGantt() {
|
||||
this.$router.push({ path: '/mes/pro/schedule/ganttedit'})
|
||||
this.$router.push({ path: "/mes/pro/schedule/ganttedit" });
|
||||
},
|
||||
getGanttTasks() {
|
||||
listGanttTaskList(this.queryParams).then(response =>{
|
||||
listGanttTaskList(this.queryParams).then((response) => {
|
||||
this.tasks.data = response.data.data;
|
||||
this.tasks.links = response.data.links;
|
||||
this.$refs.ganttChar.reload();
|
||||
@@ -377,7 +481,7 @@ export default {
|
||||
|
||||
//获取当前产品对应的生产工序
|
||||
getProcess() {
|
||||
listProductprocess(this.form.productId).then(response =>{
|
||||
listProductprocess(this.form.productId).then((response) => {
|
||||
this.processOptions = response.data;
|
||||
});
|
||||
},
|
||||
@@ -390,14 +494,14 @@ export default {
|
||||
return {
|
||||
id: node.workorderId,
|
||||
label: node.workorderName,
|
||||
children: node.children
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
/** 查询生产工单下拉树结构 */
|
||||
getTreeselect() {
|
||||
listWorkorder().then(response => {
|
||||
listWorkorder().then((response) => {
|
||||
this.workorderOptions = [];
|
||||
const data = { workorderId: 0, workorderName: '顶级节点', children: [] };
|
||||
const data = { workorderId: 0, workorderName: "顶级节点", children: [] };
|
||||
data.children = this.handleTree(response.data, "workorderId", "parentId");
|
||||
this.workorderOptions.push(data);
|
||||
});
|
||||
@@ -434,7 +538,7 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.activeProcess = 0;
|
||||
this.autoGenFlag = false;
|
||||
@@ -454,6 +558,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
@@ -497,7 +602,7 @@ export default {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
const workorderId = row.workorderId || this.ids;
|
||||
getWorkorder(workorderId).then(response => {
|
||||
getWorkorder(workorderId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.getProcess();
|
||||
this.open = true;
|
||||
@@ -512,7 +617,7 @@ export default {
|
||||
if (row != null) {
|
||||
this.form.parentId = row.workorderId;
|
||||
}
|
||||
getWorkorder(row.workorderId).then(response => {
|
||||
getWorkorder(row.workorderId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.getProcess();
|
||||
this.open = true;
|
||||
@@ -522,17 +627,17 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.workorderId != null) {
|
||||
updateWorkorder(this.form).then(response => {
|
||||
updateWorkorder(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
//this.open = false;
|
||||
this.$refs["bomlist"].getList();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWorkorder(this.form).then(response => {
|
||||
addWorkorder(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
//this.open = false;
|
||||
this.form.workorderId = response.data;
|
||||
@@ -544,12 +649,16 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除生产工单编号为"' + row.workorderId + '"的数据项?').then(function() {
|
||||
this.$modal
|
||||
.confirm('是否确认删除生产工单编号为"' + row.workorderId + '"的数据项?')
|
||||
.then(function () {
|
||||
return delWorkorder(row.workorderId);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handleSelectProduct() {
|
||||
this.$refs.itemSelect.showFlag = true;
|
||||
@@ -559,14 +668,18 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/pro/workorder/export', {
|
||||
...this.queryParams
|
||||
}, `workorder_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"mes/pro/workorder/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`workorder_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
handleFinish() {
|
||||
let that = this;
|
||||
this.$modal.confirm('是否完成工单编制?【完成后将不能更改】').then(function(){
|
||||
that.form.status = 'CONFIRMED';
|
||||
this.$modal.confirm("是否完成工单编制?【完成后将不能更改】").then(function () {
|
||||
that.form.status = "CONFIRMED";
|
||||
that.submitForm();
|
||||
});
|
||||
},
|
||||
@@ -591,14 +704,14 @@ export default {
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('WORKORDER_CODE').then(response =>{
|
||||
genCode("WORKORDER_CODE").then((response) => {
|
||||
this.form.workorderCode = response;
|
||||
});
|
||||
} else {
|
||||
this.form.workorderCode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
@@ -246,7 +246,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
v-if="scope.row.status == 'PREPARE' || scope.row.status == 'CONFIRMED'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:pro:workorder:edit']"
|
||||
>修改</el-button
|
||||
@@ -295,7 +295,7 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单编号" prop="workorderCode" >
|
||||
<el-input v-model="form.workorderCode" placeholder="请输入工单编号" />
|
||||
<el-input v-model="form.workorderCode" placeholder="请输入工单编号" :disabled="form.status == 'CONFIRMED'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
@@ -358,7 +358,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="form.status" disabled placeholder="请选择单据状态">
|
||||
<el-select v-model="form.status" :disabled="form.status !== 'CONFIRMED'" placeholder="请选择单据状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
@@ -416,7 +416,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单数量" prop="quantity">
|
||||
<el-input-number
|
||||
disabled
|
||||
:disabled="form.status !== 'CONFIRMED'"
|
||||
:min="1"
|
||||
v-model="form.quantity"
|
||||
placeholder="请输入生产数量"
|
||||
@@ -465,7 +465,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班组" prop="teamName">
|
||||
<el-input v-model="form.teamName" disabled placeholder="请选择班组">
|
||||
<el-input v-model="form.teamName" :disabled="form.status !== 'CONFIRMED'" placeholder="请选择班组">
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectTeam"
|
||||
@@ -540,7 +540,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs type="border-card" v-if="form.workorderId != null">
|
||||
<!-- <el-tabs type="border-card" v-if="form.workorderId != null">
|
||||
<el-tab-pane label="BOM组成">
|
||||
<Workorderbom
|
||||
ref="bomlist"
|
||||
@@ -550,7 +550,7 @@
|
||||
></Workorderbom>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="物料需求"> </el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tabs> -->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -561,7 +561,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
v-if="form.status == 'PREPARE' || title == '修改生产工单' && optType != 'view'"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button
|
||||
|
@@ -1,66 +1,139 @@
|
||||
/*
|
||||
2024 12 16
|
||||
Name:"生产领料父组件"
|
||||
*/
|
||||
/* 2024 12 16 Name:"生产领料父组件" */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="领料单编号" prop="issueCode">
|
||||
<el-input v-model="queryParams.issueCode" placeholder="请输入领料单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.issueCode"
|
||||
placeholder="请输入领料单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料单名称" prop="issueName">
|
||||
<el-input v-model="queryParams.issueName" placeholder="请输入领料单名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.issueName"
|
||||
placeholder="请输入领料单名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehouseName">
|
||||
<el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.warehouseName"
|
||||
placeholder="请输入仓库名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料日期" prop="issueDate">
|
||||
<el-date-picker clearable v-model="queryParams.issueDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择领料日期">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:wm:issueheader:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:issueheader:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:issueheader:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:issueheader:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:wm:issueheader:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:issueheader:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['mes:wm:issueheader:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:wm:issueheader:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="issueheaderList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="issueheaderList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="领料单编号" align="center" width="150px" prop="issueCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:issueheader:query']">{{
|
||||
scope.row.issueCode }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:issueheader:query']"
|
||||
>{{ scope.row.issueCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料单名称" align="center" prop="issueName" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="领料单名称"
|
||||
align="center"
|
||||
prop="issueName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="生产工单" align="center" prop="workorderCode" />
|
||||
<el-table-column label="客户编号" align="center" prop="clientCode" />
|
||||
<el-table-column label="客户名称" align="center" prop="clientName" />
|
||||
@@ -76,24 +149,64 @@ Name:"生产领料父组件"
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">执行领出</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)" v-hasPermi="['mes:wm:issueheader:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-hasPermi="['mes:wm:issueheader:edit']"
|
||||
>执行领出</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:issueheader:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:issueheader:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- 需求八 单据撤销 -->
|
||||
<!-- 标记 此处的按钮鉴权 待优化 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh-left" v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">撤销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">查看撤销原因</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh-left"
|
||||
v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:issueheader:edit']"
|
||||
>撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:issueheader:edit']"
|
||||
>查看撤销原因</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改生产领料单头对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
@@ -106,8 +219,13 @@ Name:"生产领料父组件"
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -120,23 +238,36 @@ Name:"生产领料父组件"
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领料日期" prop="issueDate">
|
||||
<el-date-picker clearable v-model="form.issueDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择领料日期">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.issueDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择领料日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领料仓库">
|
||||
<el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
|
||||
@change="handleWarehouseChanged">
|
||||
<el-cascader
|
||||
v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@change="handleWarehouseChanged"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="form.status" disabled>
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -145,10 +276,17 @@ Name:"生产领料父组件"
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产工单" prop="workorderCode">
|
||||
<el-input v-model="form.workorderCode" placeholder="请选择生产工单">
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleWorkorderSelect"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="handleWorkorderSelect"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
||||
<WorkorderSelect
|
||||
ref="woSelect"
|
||||
@onSelected="onWorkorderSelected"
|
||||
></WorkorderSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户编号">
|
||||
@@ -188,24 +326,50 @@ Name:"生产领料父组件"
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider v-if="form.issueId != null" content-position="center">物料信息</el-divider>
|
||||
<el-divider v-if="form.issueId != null" content-position="center"
|
||||
>物料信息</el-divider
|
||||
>
|
||||
<el-card shadow="always" v-if="form.issueId != null" class="box-card">
|
||||
<Issueline ref="line" :issueId="form.issueId" :warehouseId="form.warehouseId" :locationId="form.locationId"
|
||||
:areaId="form.areaId" :optType="optType"></Issueline>
|
||||
<Issueline
|
||||
ref="line"
|
||||
:issueId="form.issueId"
|
||||
:warehouseId="form.warehouseId"
|
||||
:locationId="form.locationId"
|
||||
:areaId="form.areaId"
|
||||
:optType="optType"
|
||||
></Issueline>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">确
|
||||
定</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 需求八 单据撤销 对话框 -->
|
||||
<el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
|
||||
<el-form ref="WithdrawnForm" :model="WithdrawnForm" :rules="WithdrawnRules" label-width="120px">
|
||||
<el-form
|
||||
ref="WithdrawnForm"
|
||||
:model="WithdrawnForm"
|
||||
:rules="WithdrawnRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="撤销原因:" prop="cancelRemark">
|
||||
<el-input type="textarea" v-model="WithdrawnForm.cancelRemark" placeholder="请输入备注"></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="WithdrawnForm.cancelRemark"
|
||||
placeholder="请输入备注"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -234,7 +398,7 @@ import {
|
||||
addIssueheader,
|
||||
updateIssueheader,
|
||||
execute,
|
||||
cancelFn
|
||||
cancelFn,
|
||||
} from "@/api/mes/wm/issueheader";
|
||||
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
|
||||
// 2024 12 19 需求五 标记点
|
||||
@@ -299,41 +463,34 @@ export default {
|
||||
issueDate: null,
|
||||
status: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
issueCode: [
|
||||
{ required: true, message: "领料单编号不能为空", trigger: "blur" },
|
||||
],
|
||||
issueCode: [{ required: true, message: "领料单编号不能为空", trigger: "blur" }],
|
||||
// issueName: [
|
||||
// { required: true, message: "领料单名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
issueDate: [
|
||||
{ required: true, message: "请指定领出日期", trigger: "blur" },
|
||||
],
|
||||
workorderCode: [
|
||||
{ required: true, message: "请指定生产工单", trigger: "blur" },
|
||||
],
|
||||
issueDate: [{ required: true, message: "请指定领出日期", trigger: "blur" }],
|
||||
workorderCode: [{ required: true, message: "请指定生产工单", trigger: "blur" }],
|
||||
},
|
||||
// 单据撤销 对话框 开关
|
||||
WithdrawnFlag: false,
|
||||
// 单据撤销 对话框 表单参数
|
||||
WithdrawnForm: {
|
||||
issueId: null,
|
||||
cancelRemark: null
|
||||
cancelRemark: null,
|
||||
},
|
||||
// 撤销单 表单校验
|
||||
WithdrawnRules: {
|
||||
cancelRemark: [
|
||||
{ required: true, message: "撤销原因不能为空", trigger: "blur" }
|
||||
]
|
||||
cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 查看撤销原因 以及 开关
|
||||
LookWithdrawnFlag: false,
|
||||
LookWithdrawn: null,
|
||||
// 监听 路由 参数 的 变量
|
||||
parameterValue: ''
|
||||
parameterValue: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -346,11 +503,13 @@ export default {
|
||||
/** 查询生产领料单头列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listIssueheader(this.queryParams).then((response) => {
|
||||
listIssueheader(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
this.issueheaderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
getWarehouseList() {
|
||||
getTreeList().then((response) => {
|
||||
@@ -433,10 +592,11 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
if (this.parameterValue) {
|
||||
this.parameterValue = null;
|
||||
this.resetForm("queryForm");
|
||||
this.$router.push('/mes/wm/issue')
|
||||
this.$router.push("/mes/wm/issue");
|
||||
} else {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
@@ -602,9 +762,10 @@ export default {
|
||||
},
|
||||
// 撤销原因 提交
|
||||
handleWithdrawnSubmit(formName) {
|
||||
this.$refs['WithdrawnForm'].validate((valid) => {
|
||||
this.$refs["WithdrawnForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
cancelFn(this.WithdrawnForm).then((res) => {
|
||||
cancelFn(this.WithdrawnForm)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
@@ -644,13 +805,14 @@ export default {
|
||||
// });
|
||||
// });
|
||||
}
|
||||
}).finally(() => {
|
||||
})
|
||||
.finally(() => {
|
||||
this.WithdrawnFlag = false;
|
||||
this.$refs['WithdrawnForm'].resetFields();
|
||||
this.$refs["WithdrawnForm"].resetFields();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -669,17 +831,17 @@ export default {
|
||||
if (params) {
|
||||
this.parameterValue = params;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 监听$route的变化,以便在用户导航到具有不同查询参数的新路由时更新parameterValue
|
||||
'parameterValue': function (to, from) {
|
||||
parameterValue: function (to, from) {
|
||||
console.log(to, from);
|
||||
this.queryParams.issueCode = to;
|
||||
setTimeout(() => {
|
||||
this.handleQuery();
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -1,62 +1,169 @@
|
||||
/*
|
||||
2024 12 16
|
||||
Name:"采购入库父组件"
|
||||
*/
|
||||
/* 2024 12 16 Name:"采购入库父组件" */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="入库单编号" prop="recptCode">
|
||||
<el-input v-model="queryParams.recptCode" placeholder="请输入入库单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库单名称" prop="recptName">
|
||||
<el-input v-model="queryParams.recptName" placeholder="请输入入库单名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.recptCode"
|
||||
placeholder="请输入入库单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="入库单名称" prop="recptName">
|
||||
<el-input
|
||||
v-model="queryParams.recptName"
|
||||
placeholder="请输入入库单名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="供应商名称" prop="vendorName">
|
||||
<el-input v-model="queryParams.vendorName" placeholder="请输入供应商名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.vendorName"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="poCode">
|
||||
<el-input v-model="queryParams.poCode" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.poCode"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="itemCode">
|
||||
<el-input
|
||||
v-model="queryParams.itemCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库日期" prop="recptDate">
|
||||
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:wm:itemrecpt:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:itemrecpt:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:itemrecpt:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:wm:itemrecpt:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:itemrecpt:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['mes:wm:itemrecpt:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:wm:itemrecpt:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="itemrecptList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="itemrecptList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="入库单编号" align="center" width="180px" prop="recptCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:itemrecpt:query']">{{
|
||||
scope.row.recptCode }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:itemrecpt:query']"
|
||||
>{{ scope.row.recptCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库单名称" align="center" prop="recptName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="供应商名称" align="center" prop="vendorName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column
|
||||
label="入库单名称"
|
||||
align="center"
|
||||
prop="recptName"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="产品物料名称"
|
||||
align="center"
|
||||
prop="itemName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="specification"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="合计重量"
|
||||
align="center"
|
||||
prop="quantityRecived"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商名称"
|
||||
align="center"
|
||||
prop="vendorName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="入库日期" align="center" prop="recptDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
|
||||
@@ -70,24 +177,64 @@ Name:"采购入库父组件"
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">执行入库</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)" v-hasPermi="['mes:wm:itemrecpt:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||
>执行入库</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:itemrecpt:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- 需求八 单据撤销 -->
|
||||
<!-- 标记 此处的按钮鉴权 待优化 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh-left" v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">撤销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">查看撤销原因</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh-left"
|
||||
v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||
>撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:itemrecpt:edit']"
|
||||
>查看撤销原因</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改物料入库单对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
@@ -100,8 +247,13 @@ Name:"采购入库父组件"
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -114,8 +266,13 @@ Name:"采购入库父组件"
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库日期" prop="recptDate">
|
||||
<el-date-picker clearable v-model="form.recptDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择入库日期">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.recptDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择入库日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -127,8 +284,12 @@ Name:"采购入库父组件"
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="form.status" disabled placeholder="请选择单据状态">
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -136,16 +297,28 @@ Name:"采购入库父组件"
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="vendorName">
|
||||
<el-input v-model="form.vendorName" readonly="readonly" placeholder="请选择供应商">
|
||||
<el-button slot="append" @click="handleSelectVendor" icon="el-icon-search"></el-button>
|
||||
<el-input
|
||||
v-model="form.vendorName"
|
||||
readonly="readonly"
|
||||
placeholder="请选择供应商"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectVendor"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库仓库">
|
||||
<el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
|
||||
@change="handleWarehouseChanged">
|
||||
<el-cascader
|
||||
v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@change="handleWarehouseChanged"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -159,24 +332,50 @@ Name:"采购入库父组件"
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider v-if="form.recptId != null" content-position="center">物料信息</el-divider>
|
||||
<el-divider v-if="form.recptId != null" content-position="center"
|
||||
>物料信息</el-divider
|
||||
>
|
||||
<el-card shadow="always" v-if="form.recptId != null" class="box-card">
|
||||
<Itemrecptline ref="line" :recptId="form.recptId" :warehouseId="form.warehouseId" :locationId="form.locationId"
|
||||
:areaId="form.areaId" :optType="optType"></Itemrecptline>
|
||||
<Itemrecptline
|
||||
ref="line"
|
||||
:recptId="form.recptId"
|
||||
:warehouseId="form.warehouseId"
|
||||
:locationId="form.locationId"
|
||||
:areaId="form.areaId"
|
||||
:optType="optType"
|
||||
></Itemrecptline>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
|
||||
存</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 需求八 单据撤销 对话框 -->
|
||||
<el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
|
||||
<el-form ref="WithdrawnForm" :model="WithdrawnForm" :rules="WithdrawnRules" label-width="120px">
|
||||
<el-form
|
||||
ref="WithdrawnForm"
|
||||
:model="WithdrawnForm"
|
||||
:rules="WithdrawnRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="撤销原因:" prop="cancelRemark">
|
||||
<el-input type="textarea" v-model="WithdrawnForm.cancelRemark" placeholder="请输入备注"></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="WithdrawnForm.cancelRemark"
|
||||
placeholder="请输入备注"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -201,16 +400,20 @@ Name:"采购入库父组件"
|
||||
<p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
|
||||
<p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
|
||||
<span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
|
||||
<router-link :to="{
|
||||
<router-link
|
||||
:to="{
|
||||
path: WithdrawnErrorObjMap[name].path,
|
||||
query: { Parameters: item },
|
||||
}" v-for="(item, ind) in value" :key="ind">
|
||||
<span style="
|
||||
color: #02a7f1;
|
||||
border-bottom: 1px solid #02a7f1;
|
||||
margin-right: 8px;
|
||||
" :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'" @click="WithdrawnErrorFlag = false">{{ item
|
||||
}}</span>
|
||||
}"
|
||||
v-for="(item, ind) in value"
|
||||
:key="ind"
|
||||
>
|
||||
<span
|
||||
style="color: #02a7f1; border-bottom: 1px solid #02a7f1; margin-right: 8px"
|
||||
:id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'"
|
||||
@click="WithdrawnErrorFlag = false"
|
||||
>{{ item }}</span
|
||||
>
|
||||
</router-link>
|
||||
</p>
|
||||
<p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
|
||||
@@ -293,25 +496,20 @@ export default {
|
||||
recptDate: null,
|
||||
poCode: null,
|
||||
status: null,
|
||||
itemCode: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
recptCode: [
|
||||
{ required: true, message: "入库单编号不能为空", trigger: "blur" },
|
||||
],
|
||||
recptCode: [{ required: true, message: "入库单编号不能为空", trigger: "blur" }],
|
||||
// 2024 12 16 需求三 入库单据名称改为非必填
|
||||
// recptName: [
|
||||
// { required: true, message: "入库单名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
recptDate: [
|
||||
{ required: true, message: "入库时间不能为空", trigger: "blur" },
|
||||
],
|
||||
vendorName: [
|
||||
{ required: true, message: "请选择对应的供应商", trigger: "blur" },
|
||||
],
|
||||
recptDate: [{ required: true, message: "入库时间不能为空", trigger: "blur" }],
|
||||
vendorName: [{ required: true, message: "请选择对应的供应商", trigger: "blur" }],
|
||||
},
|
||||
// 单据撤销 对话框 开关
|
||||
WithdrawnFlag: false,
|
||||
@@ -322,9 +520,7 @@ export default {
|
||||
},
|
||||
// 撤销单 表单校验
|
||||
WithdrawnRules: {
|
||||
cancelRemark: [
|
||||
{ required: true, message: "撤销原因不能为空", trigger: "blur" },
|
||||
],
|
||||
cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 查看撤销原因 以及 开关
|
||||
LookWithdrawnFlag: false,
|
||||
@@ -524,9 +720,7 @@ export default {
|
||||
},
|
||||
doconfirm() {
|
||||
let that = this;
|
||||
this.$modal
|
||||
.confirm("是否完成入库单编制?【完成后将不能更改】")
|
||||
.then(function () {
|
||||
this.$modal.confirm("是否完成入库单编制?【完成后将不能更改】").then(function () {
|
||||
that.form.status = "CONFIRMED";
|
||||
that.submitForm();
|
||||
});
|
||||
|
@@ -1,8 +1,5 @@
|
||||
/*
|
||||
2024 12 16
|
||||
新增props:"upFlag",用于更新父组件表单数据
|
||||
新增props:"warehouseInfo",用于获取仓库信息
|
||||
*/
|
||||
/* 2024 12 16 新增props:"upFlag",用于更新父组件表单数据
|
||||
新增props:"warehouseInfo",用于获取仓库信息 */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row v-if="optType != 'view'" :gutter="10" class="mb8">
|
||||
@@ -55,10 +52,7 @@
|
||||
>导入</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -66,12 +60,7 @@
|
||||
:data="productrecptlineList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
fixed="left"
|
||||
/>
|
||||
<el-table-column type="selection" width="55" align="center" fixed="left" />
|
||||
<el-table-column
|
||||
label="产品物料编码"
|
||||
width="120px"
|
||||
@@ -141,11 +130,15 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品物料编码" prop="itemCode">
|
||||
<el-input
|
||||
v-model="form.itemCode"
|
||||
placeholder="请输入产品物料编码"
|
||||
readonly
|
||||
/>
|
||||
<el-input v-model="form.itemCode" placeholder="请输入产品物料编码" readonly>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectProduct"
|
||||
icon="el-icon-search"
|
||||
v-if="title === '添加产品入库记录行'"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<ItemSelect ref="itemSelect" @onSelected="onItemSelected"> </ItemSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -159,22 +152,14 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="unitOfMeasure">
|
||||
<el-input
|
||||
v-model="form.unitOfMeasure"
|
||||
placeholder="请输入单位"
|
||||
readonly
|
||||
/>
|
||||
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格型号" prop="specification">
|
||||
<el-input
|
||||
v-model="form.specification"
|
||||
placeholder="请输入内容"
|
||||
readonly
|
||||
/>
|
||||
<el-input v-model="form.specification" placeholder="请输入内容" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -209,11 +194,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -251,10 +232,7 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitXlsx"
|
||||
:disabled="!(ProAllArr.length > 0)"
|
||||
<el-button type="primary" @click="submitXlsx" :disabled="!(ProAllArr.length > 0)"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancelXlsx">取 消</el-button>
|
||||
@@ -273,6 +251,7 @@ import {
|
||||
} from "@/api/mes/wm/productrecptline";
|
||||
import StockSelect from "@/components/stockSelect/single.vue";
|
||||
import { getTreeList } from "@/api/mes/wm/warehouse";
|
||||
import ItemSelect from "@/components/itemSelect/single.vue";
|
||||
// 引入xlsx
|
||||
import * as XLSX from "xlsx";
|
||||
// 引入lodash
|
||||
@@ -284,6 +263,7 @@ export default {
|
||||
name: "Productrecptline",
|
||||
components: {
|
||||
StockSelect,
|
||||
ItemSelect
|
||||
},
|
||||
props: {
|
||||
recptId: null,
|
||||
@@ -358,9 +338,7 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
itemId: [{ required: true, message: "产品不能为空", trigger: "blur" }],
|
||||
warehouseId: [
|
||||
{ required: true, message: "入库仓库不能为空", trigger: "blur" },
|
||||
],
|
||||
warehouseId: [{ required: true, message: "入库仓库不能为空", trigger: "blur" }],
|
||||
quantityRecived: [
|
||||
{ required: true, message: "入库数量不能为空", trigger: "blur" },
|
||||
],
|
||||
@@ -666,6 +644,20 @@ export default {
|
||||
this.form.areaId = obj[2];
|
||||
}
|
||||
},
|
||||
//物料选择弹出框
|
||||
handleSelectProduct() {
|
||||
this.$refs.itemSelect.showFlag = true;
|
||||
},
|
||||
//物料选择弹出框
|
||||
onItemSelected(obj) {
|
||||
if (obj != undefined && obj != null) {
|
||||
this.form.itemId = obj.itemId;
|
||||
this.form.itemCode = obj.itemCode;
|
||||
this.form.itemName = obj.itemName;
|
||||
this.form.specification = obj.specification;
|
||||
this.form.unitOfMeasure = obj.unitOfMeasure;
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeUpdate() {
|
||||
console.log(
|
||||
|
@@ -1,9 +1,21 @@
|
||||
/* 2024 12 16 Name:"销售出库父组件" */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="出库单编号" prop="salseCode">
|
||||
<el-input v-model="queryParams.salseCode" placeholder="请输入出库单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.salseCode"
|
||||
placeholder="请输入出库单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 2024 12 19 需求五 仅注释html,js部分不动,以便随时恢复 -->
|
||||
<!-- <el-form-item label="销售订单编号" prop="soCode">
|
||||
@@ -15,51 +27,106 @@
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="客户名称" prop="clientName">
|
||||
<el-input v-model="queryParams.clientName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.clientName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库日期" prop="salseDate">
|
||||
<el-date-picker clearable v-model="queryParams.salseDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择出库日期">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:wm:productsalse:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:productsalse:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:wm:productsalse:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:productsalse:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['mes:wm:productsalse:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:wm:productsalse:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="productsalseList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="productsalseList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="出库单编号" width="150px" align="center" prop="salseCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:productsalse:query']">{{
|
||||
scope.row.salseCode }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:productsalse:query']"
|
||||
>{{ scope.row.salseCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库单名称" width="150px" align="center" prop="salseName" />
|
||||
@@ -70,6 +137,8 @@
|
||||
align="center"
|
||||
prop="soCode"
|
||||
/> -->
|
||||
<el-table-column label="产品名称" align="center" prop="itemName" />
|
||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||
<el-table-column label="客户名称" align="center" prop="clientName" />
|
||||
<el-table-column label="合计重量" align="center" prop="sumQuantity">
|
||||
@@ -87,26 +156,71 @@
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="200px"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:productsalse:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:productsalse:remove']">删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-video-play" @click="handleExecute(scope.row)"
|
||||
v-if="scope.row.status == 'CONFIRMED'" v-hasPermi="['mes:wm:productsalse:edit']">执行出库</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
v-hasPermi="['mes:wm:productsalse:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-if="scope.row.status == 'CONFIRMED'"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']"
|
||||
>执行出库</el-button
|
||||
>
|
||||
<!-- 需求八 单据撤销 -->
|
||||
<!-- 标记 此处的按钮鉴权 待优化 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh-left" v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:productsalse:edit']">撤销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:productsalse:edit']">查看撤销原因</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh-left"
|
||||
v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']"
|
||||
>撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:productsalse:edit']"
|
||||
>查看撤销原因</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改销售出库单对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
@@ -119,8 +233,13 @@
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -134,25 +253,51 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否需要销售订单编号" prop="" label-width="170px">
|
||||
<el-switch v-model="needSoCodeFlag" active-color="#13ce66" inactive-color="#DCDFE6"
|
||||
@change="handleChangeNeedSoCodeFlag">
|
||||
<el-switch
|
||||
v-model="needSoCodeFlag"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#DCDFE6"
|
||||
@change="handleChangeNeedSoCodeFlag"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="销售订单编号" prop="soCode" label-width="120px" v-show="needSoCodeFlag">
|
||||
<el-input v-model="form.soCode" placeholder="请输入销售订单编号" style="width: 200px">
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleSelectOrdet"></el-button>
|
||||
<el-form-item
|
||||
label="销售订单编号"
|
||||
prop="soCode"
|
||||
label-width="120px"
|
||||
v-show="needSoCodeFlag"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.soCode"
|
||||
placeholder="请输入销售订单编号"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="handleSelectOrdet"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户编码" prop="clientCode">
|
||||
<el-input v-model="form.clientCode" placeholder="请输入客户编码" readonly="readonly" :disabled="needSoCodeFlag">
|
||||
<el-button slot="append" @click="handleSelectClient" icon="el-icon-search"
|
||||
:disabled="needSoCodeFlag"></el-button>
|
||||
<el-input
|
||||
v-model="form.clientCode"
|
||||
placeholder="请输入客户编码"
|
||||
readonly="readonly"
|
||||
:disabled="needSoCodeFlag"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectClient"
|
||||
icon="el-icon-search"
|
||||
:disabled="needSoCodeFlag"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<ClientSelect ref="clientSelect" @onSelected="onClientSelected">
|
||||
</ClientSelect>
|
||||
@@ -160,23 +305,36 @@
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="客户名称" prop="clientName">
|
||||
<el-input v-model="form.clientName" readonly="readonly" :disabled="needSoCodeFlag" />
|
||||
<el-input
|
||||
v-model="form.clientName"
|
||||
readonly="readonly"
|
||||
:disabled="needSoCodeFlag"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库日期" prop="salseDate">
|
||||
<el-date-picker clearable v-model="form.salseDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择出库日期">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.salseDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择出库日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="form.status" disabled placeholder="请选择单据状态">
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -188,6 +346,25 @@
|
||||
</el-col>
|
||||
<!-- -->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发货日期" prop="sendDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.sendDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发货日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发货车号" prop="sendCarCode">
|
||||
<el-input v-model="form.sendCarCode" placeholder="请输入发货车号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
@@ -196,27 +373,58 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider v-if="form.salseId != null" content-position="center">物料信息</el-divider>
|
||||
<el-divider v-if="form.salseId != null" content-position="center"
|
||||
>物料信息</el-divider
|
||||
>
|
||||
<el-card shadow="always" v-if="form.salseId != null" class="box-card">
|
||||
<Productsalseline ref="line" :salseId="form.salseId" :warehouseId="form.warehouseId"
|
||||
:locationId="form.locationId" :areaId="form.areaId" :optType="optType" :upFlag="upFlag"
|
||||
@changeUpFlag="changeUpFlag"></Productsalseline>
|
||||
<Productsalseline
|
||||
ref="line"
|
||||
:salseId="form.salseId"
|
||||
:warehouseId="form.warehouseId"
|
||||
:locationId="form.locationId"
|
||||
:areaId="form.areaId"
|
||||
:optType="optType"
|
||||
:upFlag="upFlag"
|
||||
@changeUpFlag="changeUpFlag"
|
||||
></Productsalseline>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
|
||||
存</el-button>
|
||||
<el-button type="success" @click="handleConfirm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view' && form.salseId != null">确 认</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="handleConfirm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view' && form.salseId != null"
|
||||
>确 认</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 需求八 单据撤销 对话框 -->
|
||||
<el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
|
||||
<el-form ref="WithdrawnForm" :model="WithdrawnForm" :rules="WithdrawnRules" label-width="120px">
|
||||
<el-form
|
||||
ref="WithdrawnForm"
|
||||
:model="WithdrawnForm"
|
||||
:rules="WithdrawnRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="撤销原因:" prop="cancelRemark">
|
||||
<el-input type="textarea" v-model="WithdrawnForm.cancelRemark" placeholder="请输入备注"></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="WithdrawnForm.cancelRemark"
|
||||
placeholder="请输入备注"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -317,6 +525,7 @@ export default {
|
||||
salseDate: null,
|
||||
status: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@@ -360,7 +569,6 @@ export default {
|
||||
this.form.soCode = null;
|
||||
this.form.clientCode = null;
|
||||
this.form.clientName = null;
|
||||
|
||||
},
|
||||
// 2024 12 16 需求二 供子组件使用 更改"upFlag"变量 触发父组件监听
|
||||
changeUpFlag() {
|
||||
@@ -369,11 +577,13 @@ export default {
|
||||
/** 查询销售出库单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProductsalse(this.queryParams).then((response) => {
|
||||
listProductsalse(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
this.productsalseList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
//获取仓库信息
|
||||
getWarehouseList() {
|
||||
@@ -457,6 +667,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
if (this.parameterValue) {
|
||||
this.parameterValue = null;
|
||||
this.resetForm("queryForm");
|
||||
@@ -474,8 +685,6 @@ export default {
|
||||
},
|
||||
// 查询明细按钮操作
|
||||
handleView(row) {
|
||||
console.log(row);
|
||||
|
||||
this.reset();
|
||||
const salseId = row.salseId;
|
||||
localStorage.setItem("productsalse-handleUpdate-salseId", JSON.stringify(salseId));
|
||||
|
@@ -1,59 +1,136 @@
|
||||
/*
|
||||
2024 12 16
|
||||
Name:"生产退料父组件"
|
||||
*/
|
||||
/* 2024 12 16 Name:"生产退料父组件" */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="退料单编号" prop="rtCode">
|
||||
<el-input v-model="queryParams.rtCode" placeholder="请输入退料单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.rtCode"
|
||||
placeholder="请输入退料单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产工单" prop="workorderCode">
|
||||
<el-input v-model="queryParams.workorderCode" placeholder="请输入生产工单编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.workorderCode"
|
||||
placeholder="请输入生产工单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehouseName">
|
||||
<el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.warehouseName"
|
||||
placeholder="请输入仓库名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料日期" prop="recptDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:wm:rtissue:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:rtissue:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:wm:rtissue:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:rtissue:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rtissueList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="rtissueList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="退料单编号" width="140px" align="center" prop="rtCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:rtissue:query']">{{
|
||||
scope.row.rtCode }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:query']"
|
||||
>{{ scope.row.rtCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退料单名称" width="120px" align="center" prop="rtName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="生产工单" width="140px" align="center" prop="workorderCode" />
|
||||
<el-table-column
|
||||
label="退料单名称"
|
||||
width="120px"
|
||||
align="center"
|
||||
prop="rtName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产工单"
|
||||
width="140px"
|
||||
align="center"
|
||||
prop="workorderCode"
|
||||
/>
|
||||
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
|
||||
<el-table-column label="库区名称" width="100px" align="center" prop="locationName" />
|
||||
<el-table-column
|
||||
label="库区名称"
|
||||
width="100px"
|
||||
align="center"
|
||||
prop="locationName"
|
||||
/>
|
||||
<el-table-column label="库位名称" align="center" prop="areaName" />
|
||||
<el-table-column label="退料日期" align="center" prop="rtDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.rtDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.rtDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" align="center" prop="status">
|
||||
@@ -61,26 +138,71 @@ Name:"生产退料父组件"
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">执行退料</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)" v-hasPermi="['mes:wm:rtissue:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>执行退料</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- 需求八 单据撤销 -->
|
||||
<!-- 标记 此处的按钮鉴权 待优化 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh-left" v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">撤销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">查看撤销原因</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh-left"
|
||||
v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtissue:edit']"
|
||||
>查看撤销原因</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改生产退料单头对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
@@ -93,8 +215,13 @@ Name:"生产退料父组件"
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -108,22 +235,38 @@ Name:"生产退料父组件"
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产工单" prop="workorderCode">
|
||||
<el-input v-model="form.workorderCode" placeholder="请输入生产工单">
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleWorkorderSelect"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="handleWorkorderSelect"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
||||
<WorkorderSelect
|
||||
ref="woSelect"
|
||||
@onSelected="onWorkorderSelected"
|
||||
></WorkorderSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="接收仓库">
|
||||
<el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
|
||||
@change="handleWarehouseChanged">
|
||||
<el-cascader
|
||||
v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@change="handleWarehouseChanged"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退料日期" prop="rtDate">
|
||||
<el-date-picker clearable v-model="form.rtDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择退料日期">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.rtDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择退料日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -158,18 +301,36 @@ Name:"生产退料父组件"
|
||||
<Rtissueline :rtId="form.rtId" :optType="optType"></Rtissueline>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
|
||||
存</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 需求八 单据撤销 对话框 -->
|
||||
<el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
|
||||
<el-form ref="WithdrawnForm" :model="WithdrawnForm" :rules="WithdrawnRules" label-width="120px">
|
||||
<el-form
|
||||
ref="WithdrawnForm"
|
||||
:model="WithdrawnForm"
|
||||
:rules="WithdrawnRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="撤销原因:" prop="cancelRemark">
|
||||
<el-input type="textarea" v-model="WithdrawnForm.cancelRemark" placeholder="请输入备注"></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="WithdrawnForm.cancelRemark"
|
||||
placeholder="请输入备注"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -191,38 +352,51 @@ Name:"生产退料父组件"
|
||||
<!-- 撤销错误 对话框 提示 需求八 -->
|
||||
<el-dialog title="提示" :visible.sync="WithdrawnErrorFlag" width="45%">
|
||||
<div>
|
||||
<p style="margin-top: 0px;">当前单据部分产品物料已出库,相关单据:</p>
|
||||
<p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
|
||||
<p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
|
||||
<span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
|
||||
<router-link :to="{
|
||||
<router-link
|
||||
:to="{
|
||||
path: WithdrawnErrorObjMap[name].path,
|
||||
query: { Parameters: item },
|
||||
}" v-for="(item, ind) in value" :key="ind">
|
||||
<span style="
|
||||
color: #02a7f1;
|
||||
border-bottom: 1px solid #02a7f1;
|
||||
margin-right: 8px;
|
||||
" :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'" @click="WithdrawnErrorFlag = false">{{ item
|
||||
}}</span>
|
||||
}"
|
||||
v-for="(item, ind) in value"
|
||||
:key="ind"
|
||||
>
|
||||
<span
|
||||
style="color: #02a7f1; border-bottom: 1px solid #02a7f1; margin-right: 8px"
|
||||
:id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'"
|
||||
@click="WithdrawnErrorFlag = false"
|
||||
>{{ item }}</span
|
||||
>
|
||||
</router-link>
|
||||
</p>
|
||||
<p style="margin-bottom: 0px;">请溯源后撤销该单据。</p>
|
||||
<p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRtissue, getRtissue, delRtissue, addRtissue, updateRtissue, execute, cancelFn } from "@/api/mes/wm/rtissue";
|
||||
import WorkorderSelect from "@/components/workorderSelect/single.vue"
|
||||
import {
|
||||
listRtissue,
|
||||
getRtissue,
|
||||
delRtissue,
|
||||
addRtissue,
|
||||
updateRtissue,
|
||||
execute,
|
||||
cancelFn,
|
||||
} from "@/api/mes/wm/rtissue";
|
||||
import WorkorderSelect from "@/components/workorderSelect/single.vue";
|
||||
import Rtissueline from "./line.vue";
|
||||
import { getTreeList } from "@/api/mes/wm/warehouse"
|
||||
import { genCode } from "@/api/system/autocode/rule"
|
||||
import { getTreeList } from "@/api/mes/wm/warehouse";
|
||||
import { genCode } from "@/api/system/autocode/rule";
|
||||
export default {
|
||||
name: "Rtissue",
|
||||
dicts: ['mes_order_status'],
|
||||
dicts: ["mes_order_status"],
|
||||
components: {
|
||||
Rtissueline, WorkorderSelect
|
||||
Rtissueline,
|
||||
WorkorderSelect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -232,8 +406,8 @@ export default {
|
||||
warehouseOptions: [],
|
||||
warehouseProps: {
|
||||
multiple: false,
|
||||
value: 'pId',
|
||||
label: 'pName',
|
||||
value: "pId",
|
||||
label: "pName",
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@@ -273,29 +447,26 @@ export default {
|
||||
rtDate: null,
|
||||
status: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
rtCode: [
|
||||
{ required: true, message: "退料单编号不能为空", trigger: "blur" }
|
||||
],
|
||||
rtCode: [{ required: true, message: "退料单编号不能为空", trigger: "blur" }],
|
||||
workorderCode: [
|
||||
{ required: true, message: "请选择要退料的生产工单", trigger: "blur" }
|
||||
]
|
||||
{ required: true, message: "请选择要退料的生产工单", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
// 单据撤销 对话框 开关
|
||||
WithdrawnFlag: false,
|
||||
// 单据撤销 对话框 表单参数
|
||||
WithdrawnForm: {
|
||||
rtId: null,
|
||||
cancelRemark: null
|
||||
cancelRemark: null,
|
||||
},
|
||||
// 撤销单 表单校验
|
||||
WithdrawnRules: {
|
||||
cancelRemark: [
|
||||
{ required: true, message: "撤销原因不能为空", trigger: "blur" }
|
||||
]
|
||||
cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 查看撤销原因 以及 开关
|
||||
LookWithdrawnFlag: false,
|
||||
@@ -329,30 +500,39 @@ export default {
|
||||
/** 查询生产退料单头列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRtissue(this.queryParams).then(response => {
|
||||
listRtissue(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
this.rtissueList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
getWarehouseList() {
|
||||
getTreeList().then(response => {
|
||||
getTreeList().then((response) => {
|
||||
if (response.data) {
|
||||
this.warehouseOptions = response.data.filter((el) => {
|
||||
return el.warehouseCode.indexOf('VIR') == -1;
|
||||
});;
|
||||
return el.warehouseCode.indexOf("VIR") == -1;
|
||||
});
|
||||
}
|
||||
this.warehouseOptions.map(w => {
|
||||
w.children.map(l => {
|
||||
let lstr = JSON.stringify(l.children).replace(/locationId/g, 'lId').replace(/areaId/g, 'pId').replace(/areaName/g, 'pName');
|
||||
this.warehouseOptions.map((w) => {
|
||||
w.children.map((l) => {
|
||||
let lstr = JSON.stringify(l.children)
|
||||
.replace(/locationId/g, "lId")
|
||||
.replace(/areaId/g, "pId")
|
||||
.replace(/areaName/g, "pName");
|
||||
l.children = JSON.parse(lstr);
|
||||
});
|
||||
|
||||
let wstr = JSON.stringify(w.children).replace(/warehouseId/g, 'wId').replace(/locationId/g, 'pId').replace(/locationName/g, 'pName');
|
||||
let wstr = JSON.stringify(w.children)
|
||||
.replace(/warehouseId/g, "wId")
|
||||
.replace(/locationId/g, "pId")
|
||||
.replace(/locationName/g, "pName");
|
||||
w.children = JSON.parse(wstr);
|
||||
|
||||
});
|
||||
let ostr = JSON.stringify(this.warehouseOptions).replace(/warehouseId/g, 'pId').replace(/warehouseName/g, 'pName');
|
||||
let ostr = JSON.stringify(this.warehouseOptions)
|
||||
.replace(/warehouseId/g, "pId")
|
||||
.replace(/warehouseName/g, "pName");
|
||||
this.warehouseOptions = JSON.parse(ostr);
|
||||
});
|
||||
},
|
||||
@@ -388,7 +568,7 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.resetForm("form");
|
||||
@@ -400,14 +580,15 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.rtId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.rtId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@@ -419,8 +600,8 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const rtId = row.rtId || this.ids
|
||||
getRtissue(rtId).then(response => {
|
||||
const rtId = row.rtId || this.ids;
|
||||
getRtissue(rtId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.warehouseInfo[0] = response.data.warehouseId;
|
||||
this.warehouseInfo[1] = response.data.locationId;
|
||||
@@ -433,8 +614,8 @@ export default {
|
||||
// 查询明细按钮操作
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const rtId = row.rtId
|
||||
getRtissue(rtId).then(response => {
|
||||
const rtId = row.rtId;
|
||||
getRtissue(rtId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.warehouseInfo[0] = response.data.warehouseId;
|
||||
this.warehouseInfo[1] = response.data.locationId;
|
||||
@@ -446,16 +627,16 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.rtId != null) {
|
||||
updateRtissue(this.form).then(response => {
|
||||
updateRtissue(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRtissue(this.form).then(response => {
|
||||
addRtissue(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -467,28 +648,40 @@ export default {
|
||||
//执行退料
|
||||
handleExecute(row) {
|
||||
const rtIds = row.rtId || this.ids;
|
||||
this.$modal.confirm('确认执行退料?').then(function () {
|
||||
return execute(rtIds)//执行退料
|
||||
}).then(() => {
|
||||
this.$modal
|
||||
.confirm("确认执行退料?")
|
||||
.then(function () {
|
||||
return execute(rtIds); //执行退料
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("退料成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const rtIds = row.rtId || this.ids;
|
||||
this.$modal.confirm('是否确认删除生产退料单头编号为"' + rtIds + '"的数据项?').then(function () {
|
||||
this.$modal
|
||||
.confirm('是否确认删除生产退料单头编号为"' + rtIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delRtissue(rtIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/wm/rtissue/export', {
|
||||
...this.queryParams
|
||||
}, `rtissue_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"mes/wm/rtissue/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`rtissue_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//选择默认的仓库、库区、库位
|
||||
handleWarehouseChanged(obj) {
|
||||
@@ -507,19 +700,19 @@ export default {
|
||||
this.form.workorderId = row.workorderId;
|
||||
this.form.workorderCode = row.workorderCode;
|
||||
|
||||
this.form.machineryId = row.machineryId
|
||||
this.form.machineryCode = row.machineryCode
|
||||
this.form.machineryName = row.machineryName
|
||||
this.form.machineryNo = row.machineryNo
|
||||
this.form.teamId = row.teamId
|
||||
this.form.teamCode = row.teamCode
|
||||
this.form.teamName = row.teamName
|
||||
this.form.machineryId = row.machineryId;
|
||||
this.form.machineryCode = row.machineryCode;
|
||||
this.form.machineryName = row.machineryName;
|
||||
this.form.machineryNo = row.machineryNo;
|
||||
this.form.teamId = row.teamId;
|
||||
this.form.teamCode = row.teamCode;
|
||||
this.form.teamName = row.teamName;
|
||||
}
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('RTISSUE_CODE').then(response => {
|
||||
genCode("RTISSUE_CODE").then((response) => {
|
||||
this.form.rtCode = response;
|
||||
});
|
||||
} else {
|
||||
@@ -534,27 +727,29 @@ export default {
|
||||
},
|
||||
// 撤销原因 提交
|
||||
handleWithdrawnSubmit(formName) {
|
||||
this.$refs['WithdrawnForm'].validate((valid) => {
|
||||
this.$refs["WithdrawnForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
cancelFn(this.WithdrawnForm).then((res) => {
|
||||
cancelFn(this.WithdrawnForm)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
}
|
||||
}).catch((res) => {
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log(res.data);
|
||||
// 错误提示 对象 (内容)
|
||||
this.WithdrawnErrorObj = res.data;
|
||||
// 打开错误提示 对话框
|
||||
this.WithdrawnErrorFlag = true;
|
||||
|
||||
}).finally(() => {
|
||||
})
|
||||
.finally(() => {
|
||||
this.WithdrawnFlag = false;
|
||||
this.$refs['WithdrawnForm'].resetFields();
|
||||
this.$refs["WithdrawnForm"].resetFields();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -565,7 +760,7 @@ export default {
|
||||
this.LookWithdrawn = val.cancelRemark;
|
||||
this.LookWithdrawnFlag = true;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@@ -1,67 +1,154 @@
|
||||
/*
|
||||
2024 12 16
|
||||
Name:"销售退货父组件"
|
||||
*/
|
||||
/* 2024 12 16 Name:"销售退货父组件" */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="退货单编号" prop="rtCode">
|
||||
<el-input v-model="queryParams.rtCode" placeholder="请输入退货单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.rtCode"
|
||||
placeholder="请输入退货单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="销售订单编号" prop="soCode">
|
||||
<el-input v-model="queryParams.soCode" placeholder="请输入销售订单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.soCode"
|
||||
placeholder="请输入销售订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户名称" prop="clientName">
|
||||
<el-input v-model="queryParams.clientName" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.clientName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="仓库名称" prop="warehouseName">
|
||||
<el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.warehouseName"
|
||||
placeholder="请输入仓库名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退货日期" prop="recptDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:wm:rtsalse:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:rtsalse:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:rtsalse:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:rtsalse:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:wm:rtsalse:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:rtsalse:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rtsalseList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="rtsalseList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="退货单编号" width="140px" align="center" prop="rtCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:rtsalse:query']">{{
|
||||
scope.row.rtCode }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtsalse:query']"
|
||||
>{{ scope.row.rtCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退货单名称" width="150px" align="center" prop="rtName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="销售出库单编号" width="120px" align="center" prop="salseCode" />
|
||||
<el-table-column label="客户名称" width="150px" align="center" prop="clientName" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="退货单名称"
|
||||
width="150px"
|
||||
align="center"
|
||||
prop="rtName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售出库单编号"
|
||||
width="120px"
|
||||
align="center"
|
||||
prop="salseCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="客户名称"
|
||||
width="150px"
|
||||
align="center"
|
||||
prop="clientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName" />
|
||||
<el-table-column label="库区" align="center" prop="locationName" />
|
||||
<el-table-column label="库位" align="center" prop="areaName" />
|
||||
@@ -77,26 +164,71 @@ Name:"销售退货父组件"
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120px" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="120px"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:rtsalse:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:rtsalse:remove']">删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-video-play" @click="handleExecute(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:rtsalse:edit']">执行退货</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
v-hasPermi="['mes:wm:rtsalse:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
v-hasPermi="['mes:wm:rtsalse:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
v-hasPermi="['mes:wm:rtsalse:edit']"
|
||||
>执行退货</el-button
|
||||
>
|
||||
<!-- 需求八 单据撤销 -->
|
||||
<!-- 标记 此处的按钮鉴权 待优化 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh-left" v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtsalse:edit']">撤销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtsalse:edit']">查看撤销原因</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh-left"
|
||||
v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtsalse:edit']"
|
||||
>撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtsalse:edit']"
|
||||
>查看撤销原因</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改产品销售退货单对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
@@ -109,8 +241,13 @@ Name:"销售退货父组件"
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -124,43 +261,71 @@ Name:"销售退货父组件"
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售出库单编号">
|
||||
<el-input v-model="form.salseCode" placeholder="请选择" readonly>
|
||||
<el-button slot="append" @click="handleProductSaleSelect" icon="el-icon-search"></el-button>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleProductSaleSelect"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<ProductSaleSelect ref="productSaleSelect" @onSelected="productSaleSelect"></ProductSaleSelect>
|
||||
<ProductSaleSelect
|
||||
ref="productSaleSelect"
|
||||
@onSelected="productSaleSelect"
|
||||
></ProductSaleSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户编号" prop="clientCode">
|
||||
<el-input v-model="form.clientCode" readonly="readonly" placeholder="请输入客户编码">
|
||||
<el-input
|
||||
v-model="form.clientCode"
|
||||
readonly="readonly"
|
||||
placeholder="请输入客户编码"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="clientName">
|
||||
<el-input v-model="form.clientName" readonly="readonly" placeholder="请输入客户名称" />
|
||||
<el-input
|
||||
v-model="form.clientName"
|
||||
readonly="readonly"
|
||||
placeholder="请输入客户名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退货日期" prop="rtDate">
|
||||
<el-date-picker clearable v-model="form.rtDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择退货日期">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.rtDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择退货日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退货仓库">
|
||||
<el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
|
||||
@change="handleWarehouseChanged">
|
||||
<el-cascader
|
||||
v-model="warehouseInfo"
|
||||
:options="warehouseOptions"
|
||||
:props="warehouseProps"
|
||||
@change="handleWarehouseChanged"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="form.status" disabled placeholder="请选择单据状态">
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -168,7 +333,11 @@ Name:"销售退货父组件"
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="退货原因" prop="rtReason">
|
||||
<el-input v-model="form.rtReason" type="textarea" placeholder="请输入退货原因" />
|
||||
<el-input
|
||||
v-model="form.rtReason"
|
||||
type="textarea"
|
||||
placeholder="请输入退货原因"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -185,18 +354,36 @@ Name:"销售退货父组件"
|
||||
<Rtsalseline ref="rtsalseline" :rtId="form.rtId" :optType="optType"></Rtsalseline>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">确
|
||||
定</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 需求八 单据撤销 对话框 -->
|
||||
<el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
|
||||
<el-form ref="WithdrawnForm" :model="WithdrawnForm" :rules="WithdrawnRules" label-width="120px">
|
||||
<el-form
|
||||
ref="WithdrawnForm"
|
||||
:model="WithdrawnForm"
|
||||
:rules="WithdrawnRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="撤销原因:" prop="cancelRemark">
|
||||
<el-input type="textarea" v-model="WithdrawnForm.cancelRemark" placeholder="请输入备注"></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="WithdrawnForm.cancelRemark"
|
||||
placeholder="请输入备注"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -218,50 +405,63 @@ Name:"销售退货父组件"
|
||||
<!-- 撤销错误 对话框 提示 需求八 -->
|
||||
<el-dialog title="提示" :visible.sync="WithdrawnErrorFlag" width="45%">
|
||||
<div>
|
||||
<p style="margin-top: 0px;">当前单据部分产品物料已出库,相关单据:</p>
|
||||
<p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
|
||||
<p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
|
||||
<span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
|
||||
<router-link :to="{
|
||||
<router-link
|
||||
:to="{
|
||||
path: WithdrawnErrorObjMap[name].path,
|
||||
query: { Parameters: item },
|
||||
}" v-for="(item, ind) in value" :key="ind">
|
||||
<span style="
|
||||
color: #02a7f1;
|
||||
border-bottom: 1px solid #02a7f1;
|
||||
margin-right: 8px;
|
||||
" :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'" @click="WithdrawnErrorFlag = false">{{ item
|
||||
}}</span>
|
||||
}"
|
||||
v-for="(item, ind) in value"
|
||||
:key="ind"
|
||||
>
|
||||
<span
|
||||
style="color: #02a7f1; border-bottom: 1px solid #02a7f1; margin-right: 8px"
|
||||
:id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'"
|
||||
@click="WithdrawnErrorFlag = false"
|
||||
>{{ item }}</span
|
||||
>
|
||||
</router-link>
|
||||
</p>
|
||||
<p style="margin-bottom: 0px;">请溯源后撤销该单据。</p>
|
||||
<p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRtsalse, getRtsalse, delRtsalse, addRtsalse, updateRtsalse, execute, cancelFn } from "@/api/mes/wm/rtsalse";
|
||||
import {
|
||||
listRtsalse,
|
||||
getRtsalse,
|
||||
delRtsalse,
|
||||
addRtsalse,
|
||||
updateRtsalse,
|
||||
execute,
|
||||
cancelFn,
|
||||
} from "@/api/mes/wm/rtsalse";
|
||||
import { listBySalseCode } from "@/api/mes/wm/productsalseline";
|
||||
|
||||
import Rtsalseline from "./line.vue";
|
||||
import ProductSaleSelect from "@/components/ProductSaleSelect/single.vue"
|
||||
import { getTreeList } from "@/api/mes/wm/warehouse"
|
||||
import { genCode } from "@/api/system/autocode/rule"
|
||||
import ProductSaleSelect from "@/components/ProductSaleSelect/single.vue";
|
||||
import { getTreeList } from "@/api/mes/wm/warehouse";
|
||||
import { genCode } from "@/api/system/autocode/rule";
|
||||
export default {
|
||||
name: "Rtsalse",
|
||||
dicts: ['mes_order_status'],
|
||||
dicts: ["mes_order_status"],
|
||||
components: {
|
||||
ProductSaleSelect, Rtsalseline
|
||||
ProductSaleSelect,
|
||||
Rtsalseline,
|
||||
},
|
||||
watch: {
|
||||
"form.salseCode"(val) {
|
||||
if (!val) {
|
||||
return
|
||||
}
|
||||
listBySalseCode({ salseCode: this.form.salseCode }).then(response => {
|
||||
this.$refs.rtsalseline.setProductsalselineList(response.data)
|
||||
})
|
||||
return;
|
||||
}
|
||||
listBySalseCode({ salseCode: this.form.salseCode }).then((response) => {
|
||||
this.$refs.rtsalseline.setProductsalselineList(response.data);
|
||||
});
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -272,8 +472,8 @@ export default {
|
||||
warehouseOptions: [],
|
||||
warehouseProps: {
|
||||
multiple: false,
|
||||
value: 'pId',
|
||||
label: 'pName',
|
||||
value: "pId",
|
||||
label: "pName",
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@@ -321,41 +521,30 @@ export default {
|
||||
attr3: null,
|
||||
attr4: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
rtCode: [
|
||||
{ required: true, message: "退货单编号不能为空", trigger: "blur" }
|
||||
],
|
||||
rtCode: [{ required: true, message: "退货单编号不能为空", trigger: "blur" }],
|
||||
// rtName: [
|
||||
// { required: true, message: "退货单名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
rtDate: [
|
||||
{ required: true, message: "请选择退货日期", trigger: "blur" }
|
||||
],
|
||||
salseCode: [
|
||||
{ required: true, message: "请选择销售单", trigger: "blur" }
|
||||
],
|
||||
clientCode: [
|
||||
{ required: true, message: "请选择客户", trigger: "blur" }
|
||||
],
|
||||
rtReason: [
|
||||
{ required: true, message: "请填写退货原因", trigger: "blur" }
|
||||
]
|
||||
rtDate: [{ required: true, message: "请选择退货日期", trigger: "blur" }],
|
||||
salseCode: [{ required: true, message: "请选择销售单", trigger: "blur" }],
|
||||
clientCode: [{ required: true, message: "请选择客户", trigger: "blur" }],
|
||||
rtReason: [{ required: true, message: "请填写退货原因", trigger: "blur" }],
|
||||
},
|
||||
// 单据撤销 对话框 开关
|
||||
WithdrawnFlag: false,
|
||||
// 单据撤销 对话框 表单参数
|
||||
WithdrawnForm: {
|
||||
rtId: null,
|
||||
cancelRemark: null
|
||||
cancelRemark: null,
|
||||
},
|
||||
// 撤销单 表单校验
|
||||
WithdrawnRules: {
|
||||
cancelRemark: [
|
||||
{ required: true, message: "撤销原因不能为空", trigger: "blur" }
|
||||
]
|
||||
cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 查看撤销原因 以及 开关
|
||||
LookWithdrawnFlag: false,
|
||||
@@ -389,30 +578,37 @@ export default {
|
||||
/** 查询产品销售退货单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRtsalse(this.queryParams).then(response => {
|
||||
listRtsalse(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||
this.rtsalseList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getWarehouseList() {
|
||||
getTreeList().then(response => {
|
||||
getTreeList().then((response) => {
|
||||
if (response.data) {
|
||||
this.warehouseOptions = response.data.filter((el) => {
|
||||
return el.warehouseCode.indexOf('VIR') == -1;
|
||||
});;
|
||||
return el.warehouseCode.indexOf("VIR") == -1;
|
||||
});
|
||||
}
|
||||
this.warehouseOptions.map(w => {
|
||||
w.children.map(l => {
|
||||
let lstr = JSON.stringify(l.children).replace(/locationId/g, 'lId').replace(/areaId/g, 'pId').replace(/areaName/g, 'pName');
|
||||
this.warehouseOptions.map((w) => {
|
||||
w.children.map((l) => {
|
||||
let lstr = JSON.stringify(l.children)
|
||||
.replace(/locationId/g, "lId")
|
||||
.replace(/areaId/g, "pId")
|
||||
.replace(/areaName/g, "pName");
|
||||
l.children = JSON.parse(lstr);
|
||||
});
|
||||
|
||||
let wstr = JSON.stringify(w.children).replace(/warehouseId/g, 'wId').replace(/locationId/g, 'pId').replace(/locationName/g, 'pName');
|
||||
let wstr = JSON.stringify(w.children)
|
||||
.replace(/warehouseId/g, "wId")
|
||||
.replace(/locationId/g, "pId")
|
||||
.replace(/locationName/g, "pName");
|
||||
w.children = JSON.parse(wstr);
|
||||
|
||||
});
|
||||
let ostr = JSON.stringify(this.warehouseOptions).replace(/warehouseId/g, 'pId').replace(/warehouseName/g, 'pName');
|
||||
let ostr = JSON.stringify(this.warehouseOptions)
|
||||
.replace(/warehouseId/g, "pId")
|
||||
.replace(/warehouseName/g, "pName");
|
||||
this.warehouseOptions = JSON.parse(ostr);
|
||||
});
|
||||
},
|
||||
@@ -460,7 +656,7 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.autoGenFlag = false;
|
||||
this.resetForm("form");
|
||||
@@ -472,14 +668,15 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.rtId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.rtId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
//客户选择事件
|
||||
handleProductSaleSelect() {
|
||||
@@ -504,8 +701,8 @@ export default {
|
||||
// 查询明细按钮操作
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const rtIds = row.rtId
|
||||
getRtsalse(rtIds).then(response => {
|
||||
const rtIds = row.rtId;
|
||||
getRtsalse(rtIds).then((response) => {
|
||||
this.form = response.data;
|
||||
this.warehouseInfo[0] = response.data.warehouseId;
|
||||
this.warehouseInfo[1] = response.data.locationId;
|
||||
@@ -518,18 +715,22 @@ export default {
|
||||
//执行入库
|
||||
handleExecute(row) {
|
||||
const rtIds = row.rtId || this.ids;
|
||||
this.$modal.confirm('确认执行退货?').then(function () {
|
||||
return execute(rtIds)//执行退货
|
||||
}).then(() => {
|
||||
this.$modal
|
||||
.confirm("确认执行退货?")
|
||||
.then(function () {
|
||||
return execute(rtIds); //执行退货
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("退货成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const rtId = row.rtId || this.ids
|
||||
getRtsalse(rtId).then(response => {
|
||||
const rtId = row.rtId || this.ids;
|
||||
getRtsalse(rtId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.warehouseInfo[0] = response.data.warehouseId;
|
||||
this.warehouseInfo[1] = response.data.locationId;
|
||||
@@ -541,16 +742,16 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.rtId != null) {
|
||||
updateRtsalse(this.form).then(response => {
|
||||
updateRtsalse(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRtsalse(this.form).then(response => {
|
||||
addRtsalse(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -562,23 +763,31 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const rtIds = row.rtId || this.ids;
|
||||
this.$modal.confirm('是否确认删除产品销售退货单编号为"' + rtIds + '"的数据项?').then(function () {
|
||||
this.$modal
|
||||
.confirm('是否确认删除产品销售退货单编号为"' + rtIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delRtsalse(rtIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/wm/rtsalse/export', {
|
||||
...this.queryParams
|
||||
}, `rtsalse_${new Date().getTime()}.xlsx`)
|
||||
this.download(
|
||||
"mes/wm/rtsalse/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`rtsalse_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('RTSALSE_CODE').then(response => {
|
||||
genCode("RTSALSE_CODE").then((response) => {
|
||||
this.form.rtCode = response;
|
||||
});
|
||||
} else {
|
||||
@@ -593,27 +802,29 @@ export default {
|
||||
},
|
||||
// 撤销原因 提交
|
||||
handleWithdrawnSubmit(formName) {
|
||||
this.$refs['WithdrawnForm'].validate((valid) => {
|
||||
this.$refs["WithdrawnForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
cancelFn(this.WithdrawnForm).then((res) => {
|
||||
cancelFn(this.WithdrawnForm)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
}
|
||||
}).catch((res) => {
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log(res.data);
|
||||
// 错误提示 对象 (内容)
|
||||
this.WithdrawnErrorObj = res.data;
|
||||
// 打开错误提示 对话框
|
||||
this.WithdrawnErrorFlag = true;
|
||||
|
||||
}).finally(() => {
|
||||
})
|
||||
.finally(() => {
|
||||
this.WithdrawnFlag = false;
|
||||
this.$refs['WithdrawnForm'].resetFields();
|
||||
this.$refs["WithdrawnForm"].resetFields();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -624,7 +835,7 @@ export default {
|
||||
this.LookWithdrawn = val.cancelRemark;
|
||||
this.LookWithdrawnFlag = true;
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@@ -1,64 +1,145 @@
|
||||
/*
|
||||
2024 12 16
|
||||
Name:"供应商退货父组件"
|
||||
*/
|
||||
/* 2024 12 16 Name:"供应商退货父组件" */
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item label="退货单编号" prop="rtCode">
|
||||
<el-input v-model="queryParams.rtCode" placeholder="请输入退货单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.rtCode"
|
||||
placeholder="请输入退货单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退货单名称" prop="rtName">
|
||||
<el-input v-model="queryParams.rtName" placeholder="请输入退货单名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.rtName"
|
||||
placeholder="请输入退货单名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购订单编号" prop="poCode">
|
||||
<el-input v-model="queryParams.poCode" placeholder="请输入采购订单编号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.poCode"
|
||||
placeholder="请输入采购订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="vendorName">
|
||||
<el-input v-model="queryParams.vendorName" placeholder="请输入供应商名称" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.vendorName"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="recptDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['mes:wm:rtvendor:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:wm:rtvendor:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:rtvendor:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:wm:rtvendor:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['mes:wm:rtvendor:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:wm:rtvendor:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['mes:wm:rtvendor:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:wm:rtvendor:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 需求八:2025 01 09 -->
|
||||
<el-table v-loading="loading" :data="rtvendorList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="rtvendorList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="退货单编号" align="center" prop="rtCode">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:rtvendor:query']">{{
|
||||
scope.row.rtCode }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtvendor:query']"
|
||||
>{{ scope.row.rtCode }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退货单名称" align="center" prop="rtName" />
|
||||
<el-table-column label="采购订单编号" align="center" prop="poCode" />
|
||||
<el-table-column label="供应商编码" align="center" prop="vendorCode" />
|
||||
<el-table-column label="供应商名称" align="center" width="150px" prop="vendorName" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="供应商名称"
|
||||
align="center"
|
||||
width="150px"
|
||||
prop="vendorName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="退货日期" align="center" prop="rtDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.rtDate, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.rtDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" align="center" prop="status">
|
||||
@@ -66,26 +147,71 @@ Name:"供应商退货父组件"
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="200"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">执行退货</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)" v-hasPermi="['mes:wm:rtvendor:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleExecute(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtvendor:edit']"
|
||||
>执行退货</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtvendor:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status == 'PREPARE'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtvendor:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- 需求八 单据撤销 -->
|
||||
<!-- 标记 此处的按钮鉴权 待优化 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh-left" v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">撤销</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">查看撤销原因</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh-left"
|
||||
v-if="scope.row.status == 'FINISHED'"
|
||||
@click="handleWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtvendor:edit']"
|
||||
>撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="scope.row.status == 'CANCEL'"
|
||||
@click="handleLookWithdrawn(scope.row)"
|
||||
v-hasPermi="['mes:wm:rtvendor:edit']"
|
||||
>查看撤销原因</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改供应商退货对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
@@ -98,8 +224,13 @@ Name:"供应商退货父组件"
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="80">
|
||||
<el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
|
||||
<el-switch
|
||||
v-model="autoGenFlag"
|
||||
active-color="#13ce66"
|
||||
active-text="自动生成"
|
||||
@change="handleAutoGenChange(autoGenFlag)"
|
||||
v-if="optType != 'view' && form.status == 'PREPARE'"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -117,8 +248,16 @@ Name:"供应商退货父组件"
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="vendorName">
|
||||
<el-input v-model="form.vendorName" readonly="readonly" placeholder="请选择供应商">
|
||||
<el-button slot="append" @click="handleSelectVendor" icon="el-icon-search"></el-button>
|
||||
<el-input
|
||||
v-model="form.vendorName"
|
||||
readonly="readonly"
|
||||
placeholder="请选择供应商"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
@click="handleSelectVendor"
|
||||
icon="el-icon-search"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
|
||||
</el-form-item>
|
||||
@@ -132,16 +271,25 @@ Name:"供应商退货父组件"
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退货日期" prop="rtDate">
|
||||
<el-date-picker clearable v-model="form.rtDate" type="date" value-format="yyyy-MM-dd"
|
||||
placeholder="请选择退货日期">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.rtDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择退货日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="form.status" disabled placeholder="请选择单据状态">
|
||||
<el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-option
|
||||
v-for="dict in dict.type.mes_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -156,23 +304,46 @@ Name:"供应商退货父组件"
|
||||
</el-form>
|
||||
<el-divider v-if="form.rtId != null" content-position="center">物料信息</el-divider>
|
||||
<el-card shadow="always" v-if="form.rtId != null" class="box-card">
|
||||
<Rtvendorline ref=line :rtId="form.rtId" :batchCode="form.batchCdoe" :vendorId="form.vendorId"
|
||||
:optType="optType">
|
||||
<Rtvendorline
|
||||
ref="line"
|
||||
:rtId="form.rtId"
|
||||
:batchCode="form.batchCdoe"
|
||||
:vendorId="form.vendorId"
|
||||
:optType="optType"
|
||||
>
|
||||
</Rtvendorline>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
|
||||
存</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="cancel"
|
||||
v-if="optType == 'view' || form.status != 'PREPARE'"
|
||||
>返回</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
v-if="form.status == 'PREPARE' && optType != 'view'"
|
||||
>保 存</el-button
|
||||
>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 需求八 单据撤销 对话框 -->
|
||||
<el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
|
||||
<el-form ref="WithdrawnForm" :model="WithdrawnForm" :rules="WithdrawnRules" label-width="120px">
|
||||
<el-form
|
||||
ref="WithdrawnForm"
|
||||
:model="WithdrawnForm"
|
||||
:rules="WithdrawnRules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="撤销原因:" prop="cancelRemark">
|
||||
<el-input type="textarea" v-model="WithdrawnForm.cancelRemark" placeholder="请输入备注"></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="WithdrawnForm.cancelRemark"
|
||||
placeholder="请输入备注"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -194,14 +365,22 @@ Name:"供应商退货父组件"
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRtvendor, getRtvendor, delRtvendor, addRtvendor, updateRtvendor, execute, cancelFn } from "@/api/mes/wm/rtvendor";
|
||||
import { genCode } from "@/api/system/autocode/rule"
|
||||
import {
|
||||
listRtvendor,
|
||||
getRtvendor,
|
||||
delRtvendor,
|
||||
addRtvendor,
|
||||
updateRtvendor,
|
||||
execute,
|
||||
cancelFn,
|
||||
} from "@/api/mes/wm/rtvendor";
|
||||
import { genCode } from "@/api/system/autocode/rule";
|
||||
import VendorSelect from "@/components/vendorSelect/single.vue";
|
||||
import Rtvendorline from "./line.vue"
|
||||
import Rtvendorline from "./line.vue";
|
||||
export default {
|
||||
name: "Rtvendor",
|
||||
components: { VendorSelect, Rtvendorline },
|
||||
dicts: ['mes_order_status'],
|
||||
dicts: ["mes_order_status"],
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
@@ -239,41 +418,34 @@ export default {
|
||||
rtDate: null,
|
||||
status: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
rtCode: [
|
||||
{ required: true, message: "退货单编号不能为空", trigger: "blur" }
|
||||
],
|
||||
rtCode: [{ required: true, message: "退货单编号不能为空", trigger: "blur" }],
|
||||
// rtName: [
|
||||
// { required: true, message: "退货单名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
vendorName: [
|
||||
{ required: true, message: "供应商不能为空", trigger: "blur" }
|
||||
],
|
||||
rtDate: [
|
||||
{ required: true, message: "退货日期不能为空", trigger: "blur" }
|
||||
]
|
||||
vendorName: [{ required: true, message: "供应商不能为空", trigger: "blur" }],
|
||||
rtDate: [{ required: true, message: "退货日期不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 单据撤销 对话框 开关
|
||||
WithdrawnFlag: false,
|
||||
// 单据撤销 对话框 表单参数
|
||||
WithdrawnForm: {
|
||||
rtId: null,
|
||||
cancelRemark: null
|
||||
cancelRemark: null,
|
||||
},
|
||||
// 撤销单 表单校验
|
||||
WithdrawnRules: {
|
||||
cancelRemark: [
|
||||
{ required: true, message: "撤销原因不能为空", trigger: "blur" }
|
||||
]
|
||||
cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
|
||||
},
|
||||
// 查看撤销原因 以及 开关
|
||||
LookWithdrawnFlag: false,
|
||||
LookWithdrawn: null,
|
||||
// 监听 路由 参数 的 变量
|
||||
parameterValue: ''
|
||||
parameterValue: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -285,7 +457,7 @@ export default {
|
||||
/** 查询供应商退货列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRtvendor(this.queryParams).then(response => {
|
||||
listRtvendor(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
|
||||
this.rtvendorList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@@ -313,8 +485,9 @@ export default {
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
};
|
||||
this.dateRange = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@@ -327,7 +500,7 @@ export default {
|
||||
if (this.parameterValue) {
|
||||
this.parameterValue = null;
|
||||
this.resetForm("queryForm");
|
||||
this.$router.push('/mes/wm/rtvendor')
|
||||
this.$router.push("/mes/wm/rtvendor");
|
||||
} else {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
@@ -335,9 +508,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.rtId)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map((item) => item.rtId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@@ -349,8 +522,8 @@ export default {
|
||||
// 查询明细按钮操作
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const rtIds = row.rtId
|
||||
getRtvendor(rtIds).then(response => {
|
||||
const rtIds = row.rtId;
|
||||
getRtvendor(rtIds).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看退货单信息";
|
||||
@@ -360,8 +533,8 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const rtId = row.rtId || this.ids
|
||||
getRtvendor(rtId).then(response => {
|
||||
const rtId = row.rtId || this.ids;
|
||||
getRtvendor(rtId).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改供应商退货";
|
||||
@@ -370,16 +543,16 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.rtId != null) {
|
||||
updateRtvendor(this.form).then(response => {
|
||||
updateRtvendor(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRtvendor(this.form).then(response => {
|
||||
addRtvendor(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -391,36 +564,50 @@ export default {
|
||||
//确认单据
|
||||
doconfirm() {
|
||||
let that = this;
|
||||
this.$modal.confirm('是否完成供应商退货编制?【完成后将不能更改】').then(function () {
|
||||
that.form.status = 'CONFIRMED';
|
||||
this.$modal
|
||||
.confirm("是否完成供应商退货编制?【完成后将不能更改】")
|
||||
.then(function () {
|
||||
that.form.status = "CONFIRMED";
|
||||
that.submitForm();
|
||||
});
|
||||
},
|
||||
//执行退货
|
||||
handleExecute(row) {
|
||||
const rtIds = row.rtId || this.ids;
|
||||
this.$modal.confirm('确认执行退货?').then(function () {
|
||||
return execute(rtIds)//执行入库
|
||||
}).then(() => {
|
||||
this.$modal
|
||||
.confirm("确认执行退货?")
|
||||
.then(function () {
|
||||
return execute(rtIds); //执行入库
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("退货成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const rtIds = row.rtId || this.ids;
|
||||
this.$modal.confirm('是否确认删除供应商退货编号为"' + rtIds + '"的数据项?').then(function () {
|
||||
this.$modal
|
||||
.confirm('是否确认删除供应商退货编号为"' + rtIds + '"的数据项?')
|
||||
.then(function () {
|
||||
return delRtvendor(rtIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/wm/rtvendor/export', {
|
||||
...this.queryParams
|
||||
}, `供应商退货数据.xlsx`)
|
||||
this.download(
|
||||
"mes/wm/rtvendor/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`供应商退货数据.xlsx`
|
||||
);
|
||||
},
|
||||
//供应商选择
|
||||
handleSelectVendor() {
|
||||
@@ -438,7 +625,7 @@ export default {
|
||||
//自动生成编码
|
||||
handleAutoGenChange(autoGenFlag) {
|
||||
if (autoGenFlag) {
|
||||
genCode('WM_RTVENDOR_CODE').then(response => {
|
||||
genCode("WM_RTVENDOR_CODE").then((response) => {
|
||||
this.form.rtCode = response;
|
||||
});
|
||||
} else {
|
||||
@@ -453,20 +640,22 @@ export default {
|
||||
},
|
||||
// 撤销原因 提交
|
||||
handleWithdrawnSubmit(formName) {
|
||||
this.$refs['WithdrawnForm'].validate((valid) => {
|
||||
this.$refs["WithdrawnForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
cancelFn(this.WithdrawnForm).then((res) => {
|
||||
cancelFn(this.WithdrawnForm)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.code == 200) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
}
|
||||
}).finally(() => {
|
||||
})
|
||||
.finally(() => {
|
||||
this.WithdrawnFlag = false;
|
||||
this.$refs['WithdrawnForm'].resetFields();
|
||||
this.$refs["WithdrawnForm"].resetFields();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -485,17 +674,17 @@ export default {
|
||||
if (params) {
|
||||
this.parameterValue = params;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 监听$route的变化,以便在用户导航到具有不同查询参数的新路由时更新parameterValue
|
||||
'parameterValue': function (to, from) {
|
||||
parameterValue: function (to, from) {
|
||||
console.log(to, from);
|
||||
this.queryParams.rtCode = to;
|
||||
setTimeout(() => {
|
||||
this.handleQuery();
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -42,6 +42,17 @@
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="转移日期" prop="recptDate">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@@ -325,6 +336,7 @@ export default {
|
||||
transferCode: null, transferName: null, transferType: null, destination: null, carrier: null, bookingNote: null, fromWarehouseId: null, fromWarehouseCode: null, fromWarehouseName: null, toWarehouseId: null, toWarehouseCode: null, toWarehouseName: null, transferDate: null, status: null, },
|
||||
// 表单参数
|
||||
form: {},
|
||||
dateRange: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
transferCode: [
|
||||
@@ -356,7 +368,7 @@ export default {
|
||||
/** 查询转移单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTransfer(this.queryParams).then(response => {
|
||||
listTransfer(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.transferList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@@ -411,6 +423,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@@ -88,11 +88,13 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="库存有效期" prop="expireDate">
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.expireDate"
|
||||
type="date"
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择库存有效期"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -140,12 +142,7 @@
|
||||
:data="wmstockList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
fixed="left"
|
||||
/>
|
||||
<el-table-column type="selection" width="55" align="center" fixed="left" />
|
||||
<el-table-column
|
||||
label="产品物料编码"
|
||||
width="120px"
|
||||
@@ -165,11 +162,7 @@
|
||||
prop="specification"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="在库重量"
|
||||
align="center"
|
||||
prop="quantityOnhand"
|
||||
/>
|
||||
<el-table-column label="在库重量" align="center" prop="quantityOnhand" />
|
||||
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||
<el-table-column
|
||||
label="入库批次号"
|
||||
@@ -200,17 +193,8 @@
|
||||
align="center"
|
||||
prop="vendorNick"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产工单"
|
||||
width="100px"
|
||||
prop="workorderCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库日期"
|
||||
align="center"
|
||||
prop="recptDate"
|
||||
width="120"
|
||||
>
|
||||
<el-table-column label="生产工单" width="100px" prop="workorderCode" />
|
||||
<el-table-column label="入库日期" align="center" prop="recptDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
@@ -323,6 +307,7 @@ export default {
|
||||
workorderCode: null,
|
||||
expireDate: null,
|
||||
},
|
||||
dateRange: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
};
|
||||
@@ -370,11 +355,13 @@ export default {
|
||||
/** 查询库存记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWmstock(this.queryParams).then((response) => {
|
||||
listWmstock(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
this.wmstockList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 查询分类下拉树结构 */
|
||||
getTreeselect() {
|
||||
@@ -399,6 +386,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
@@ -35,14 +35,14 @@ module.exports = {
|
||||
// webpack-dev-server 相关配置
|
||||
devServer: {
|
||||
// ip 变化
|
||||
host: "172.16.10.34",
|
||||
host: "0.0.0.0",
|
||||
port: port,
|
||||
open: true,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://172.16.10.97:8002`,
|
||||
target: `http://116.204.107.54:8002`,
|
||||
target: `http://172.16.10.97:8002`,
|
||||
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
Reference in New Issue
Block a user