up
This commit is contained in:
		
							
								
								
									
										396
									
								
								.eslintrc.js
									
									
									
									
									
								
							
							
						
						
									
										396
									
								
								.eslintrc.js
									
									
									
									
									
								
							@@ -1,199 +1,199 @@
 | 
				
			|||||||
// ESlint 检查配置
 | 
					// // ESlint 检查配置
 | 
				
			||||||
module.exports = {
 | 
					// module.exports = {
 | 
				
			||||||
  root: true,
 | 
					//   root: true,
 | 
				
			||||||
  parserOptions: {
 | 
					//   parserOptions: {
 | 
				
			||||||
    parser: 'babel-eslint',
 | 
					//     parser: 'babel-eslint',
 | 
				
			||||||
    sourceType: 'module'
 | 
					//     sourceType: 'module'
 | 
				
			||||||
  },
 | 
					//   },
 | 
				
			||||||
  env: {
 | 
					//   env: {
 | 
				
			||||||
    browser: true,
 | 
					//     browser: true,
 | 
				
			||||||
    node: true,
 | 
					//     node: true,
 | 
				
			||||||
    es6: true,
 | 
					//     es6: true,
 | 
				
			||||||
  },
 | 
					//   },
 | 
				
			||||||
  extends: ['plugin:vue/recommended', 'eslint:recommended'],
 | 
					//   extends: ['plugin:vue/recommended', 'eslint:recommended'],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // add your custom rules here
 | 
					//   // add your custom rules here
 | 
				
			||||||
  //it is base on https://github.com/vuejs/eslint-config-vue
 | 
					//   //it is base on https://github.com/vuejs/eslint-config-vue
 | 
				
			||||||
  rules: {
 | 
					//   rules: {
 | 
				
			||||||
    "vue/max-attributes-per-line": [2, {
 | 
					//     "vue/max-attributes-per-line": [2, {
 | 
				
			||||||
      "singleline": 10,
 | 
					//       "singleline": 10,
 | 
				
			||||||
      "multiline": {
 | 
					//       "multiline": {
 | 
				
			||||||
        "max": 1,
 | 
					//         "max": 1,
 | 
				
			||||||
        "allowFirstLine": false
 | 
					//         "allowFirstLine": false
 | 
				
			||||||
      }
 | 
					//       }
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    "vue/singleline-html-element-content-newline": "off",
 | 
					//     "vue/singleline-html-element-content-newline": "off",
 | 
				
			||||||
    "vue/multiline-html-element-content-newline":"off",
 | 
					//     "vue/multiline-html-element-content-newline":"off",
 | 
				
			||||||
    "vue/name-property-casing": ["error", "PascalCase"],
 | 
					//     "vue/name-property-casing": ["error", "PascalCase"],
 | 
				
			||||||
    "vue/no-v-html": "off",
 | 
					//     "vue/no-v-html": "off",
 | 
				
			||||||
    'accessor-pairs': 2,
 | 
					//     'accessor-pairs': 2,
 | 
				
			||||||
    'arrow-spacing': [2, {
 | 
					//     'arrow-spacing': [2, {
 | 
				
			||||||
      'before': true,
 | 
					//       'before': true,
 | 
				
			||||||
      'after': true
 | 
					//       'after': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'block-spacing': [2, 'always'],
 | 
					//     'block-spacing': [2, 'always'],
 | 
				
			||||||
    'brace-style': [2, '1tbs', {
 | 
					//     'brace-style': [2, '1tbs', {
 | 
				
			||||||
      'allowSingleLine': true
 | 
					//       'allowSingleLine': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'camelcase': [0, {
 | 
					//     'camelcase': [0, {
 | 
				
			||||||
      'properties': 'always'
 | 
					//       'properties': 'always'
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'comma-dangle': [2, 'never'],
 | 
					//     'comma-dangle': [2, 'never'],
 | 
				
			||||||
    'comma-spacing': [2, {
 | 
					//     'comma-spacing': [2, {
 | 
				
			||||||
      'before': false,
 | 
					//       'before': false,
 | 
				
			||||||
      'after': true
 | 
					//       'after': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'comma-style': [2, 'last'],
 | 
					//     'comma-style': [2, 'last'],
 | 
				
			||||||
    'constructor-super': 2,
 | 
					//     'constructor-super': 2,
 | 
				
			||||||
    'curly': [2, 'multi-line'],
 | 
					//     'curly': [2, 'multi-line'],
 | 
				
			||||||
    'dot-location': [2, 'property'],
 | 
					//     'dot-location': [2, 'property'],
 | 
				
			||||||
    'eol-last': 2,
 | 
					//     'eol-last': 2,
 | 
				
			||||||
    'eqeqeq': ["error", "always", {"null": "ignore"}],
 | 
					//     'eqeqeq': ["error", "always", {"null": "ignore"}],
 | 
				
			||||||
    'generator-star-spacing': [2, {
 | 
					//     'generator-star-spacing': [2, {
 | 
				
			||||||
      'before': true,
 | 
					//       'before': true,
 | 
				
			||||||
      'after': true
 | 
					//       'after': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'handle-callback-err': [2, '^(err|error)$'],
 | 
					//     'handle-callback-err': [2, '^(err|error)$'],
 | 
				
			||||||
    'indent': [2, 2, {
 | 
					//     'indent': [2, 2, {
 | 
				
			||||||
      'SwitchCase': 1
 | 
					//       'SwitchCase': 1
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'jsx-quotes': [2, 'prefer-single'],
 | 
					//     'jsx-quotes': [2, 'prefer-single'],
 | 
				
			||||||
    'key-spacing': [2, {
 | 
					//     'key-spacing': [2, {
 | 
				
			||||||
      'beforeColon': false,
 | 
					//       'beforeColon': false,
 | 
				
			||||||
      'afterColon': true
 | 
					//       'afterColon': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'keyword-spacing': [2, {
 | 
					//     'keyword-spacing': [2, {
 | 
				
			||||||
      'before': true,
 | 
					//       'before': true,
 | 
				
			||||||
      'after': true
 | 
					//       'after': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'new-cap': [2, {
 | 
					//     'new-cap': [2, {
 | 
				
			||||||
      'newIsCap': true,
 | 
					//       'newIsCap': true,
 | 
				
			||||||
      'capIsNew': false
 | 
					//       'capIsNew': false
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'new-parens': 2,
 | 
					//     'new-parens': 2,
 | 
				
			||||||
    'no-array-constructor': 2,
 | 
					//     'no-array-constructor': 2,
 | 
				
			||||||
    'no-caller': 2,
 | 
					//     'no-caller': 2,
 | 
				
			||||||
    'no-console': 'off',
 | 
					//     'no-console': 'off',
 | 
				
			||||||
    'no-class-assign': 2,
 | 
					//     'no-class-assign': 2,
 | 
				
			||||||
    'no-cond-assign': 2,
 | 
					//     'no-cond-assign': 2,
 | 
				
			||||||
    'no-const-assign': 2,
 | 
					//     'no-const-assign': 2,
 | 
				
			||||||
    'no-control-regex': 0,
 | 
					//     'no-control-regex': 0,
 | 
				
			||||||
    'no-delete-var': 2,
 | 
					//     'no-delete-var': 2,
 | 
				
			||||||
    'no-dupe-args': 2,
 | 
					//     'no-dupe-args': 2,
 | 
				
			||||||
    'no-dupe-class-members': 2,
 | 
					//     'no-dupe-class-members': 2,
 | 
				
			||||||
    'no-dupe-keys': 2,
 | 
					//     'no-dupe-keys': 2,
 | 
				
			||||||
    'no-duplicate-case': 2,
 | 
					//     'no-duplicate-case': 2,
 | 
				
			||||||
    'no-empty-character-class': 2,
 | 
					//     'no-empty-character-class': 2,
 | 
				
			||||||
    'no-empty-pattern': 2,
 | 
					//     'no-empty-pattern': 2,
 | 
				
			||||||
    'no-eval': 2,
 | 
					//     'no-eval': 2,
 | 
				
			||||||
    'no-ex-assign': 2,
 | 
					//     'no-ex-assign': 2,
 | 
				
			||||||
    'no-extend-native': 2,
 | 
					//     'no-extend-native': 2,
 | 
				
			||||||
    'no-extra-bind': 2,
 | 
					//     'no-extra-bind': 2,
 | 
				
			||||||
    'no-extra-boolean-cast': 2,
 | 
					//     'no-extra-boolean-cast': 2,
 | 
				
			||||||
    'no-extra-parens': [2, 'functions'],
 | 
					//     'no-extra-parens': [2, 'functions'],
 | 
				
			||||||
    'no-fallthrough': 2,
 | 
					//     'no-fallthrough': 2,
 | 
				
			||||||
    'no-floating-decimal': 2,
 | 
					//     'no-floating-decimal': 2,
 | 
				
			||||||
    'no-func-assign': 2,
 | 
					//     'no-func-assign': 2,
 | 
				
			||||||
    'no-implied-eval': 2,
 | 
					//     'no-implied-eval': 2,
 | 
				
			||||||
    'no-inner-declarations': [2, 'functions'],
 | 
					//     'no-inner-declarations': [2, 'functions'],
 | 
				
			||||||
    'no-invalid-regexp': 2,
 | 
					//     'no-invalid-regexp': 2,
 | 
				
			||||||
    'no-irregular-whitespace': 2,
 | 
					//     'no-irregular-whitespace': 2,
 | 
				
			||||||
    'no-iterator': 2,
 | 
					//     'no-iterator': 2,
 | 
				
			||||||
    'no-label-var': 2,
 | 
					//     'no-label-var': 2,
 | 
				
			||||||
    'no-labels': [2, {
 | 
					//     'no-labels': [2, {
 | 
				
			||||||
      'allowLoop': false,
 | 
					//       'allowLoop': false,
 | 
				
			||||||
      'allowSwitch': false
 | 
					//       'allowSwitch': false
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'no-lone-blocks': 2,
 | 
					//     'no-lone-blocks': 2,
 | 
				
			||||||
    'no-mixed-spaces-and-tabs': 2,
 | 
					//     'no-mixed-spaces-and-tabs': 2,
 | 
				
			||||||
    'no-multi-spaces': 2,
 | 
					//     'no-multi-spaces': 2,
 | 
				
			||||||
    'no-multi-str': 2,
 | 
					//     'no-multi-str': 2,
 | 
				
			||||||
    'no-multiple-empty-lines': [2, {
 | 
					//     'no-multiple-empty-lines': [2, {
 | 
				
			||||||
      'max': 1
 | 
					//       'max': 1
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'no-native-reassign': 2,
 | 
					//     'no-native-reassign': 2,
 | 
				
			||||||
    'no-negated-in-lhs': 2,
 | 
					//     'no-negated-in-lhs': 2,
 | 
				
			||||||
    'no-new-object': 2,
 | 
					//     'no-new-object': 2,
 | 
				
			||||||
    'no-new-require': 2,
 | 
					//     'no-new-require': 2,
 | 
				
			||||||
    'no-new-symbol': 2,
 | 
					//     'no-new-symbol': 2,
 | 
				
			||||||
    'no-new-wrappers': 2,
 | 
					//     'no-new-wrappers': 2,
 | 
				
			||||||
    'no-obj-calls': 2,
 | 
					//     'no-obj-calls': 2,
 | 
				
			||||||
    'no-octal': 2,
 | 
					//     'no-octal': 2,
 | 
				
			||||||
    'no-octal-escape': 2,
 | 
					//     'no-octal-escape': 2,
 | 
				
			||||||
    'no-path-concat': 2,
 | 
					//     'no-path-concat': 2,
 | 
				
			||||||
    'no-proto': 2,
 | 
					//     'no-proto': 2,
 | 
				
			||||||
    'no-redeclare': 2,
 | 
					//     'no-redeclare': 2,
 | 
				
			||||||
    'no-regex-spaces': 2,
 | 
					//     'no-regex-spaces': 2,
 | 
				
			||||||
    'no-return-assign': [2, 'except-parens'],
 | 
					//     'no-return-assign': [2, 'except-parens'],
 | 
				
			||||||
    'no-self-assign': 2,
 | 
					//     'no-self-assign': 2,
 | 
				
			||||||
    'no-self-compare': 2,
 | 
					//     'no-self-compare': 2,
 | 
				
			||||||
    'no-sequences': 2,
 | 
					//     'no-sequences': 2,
 | 
				
			||||||
    'no-shadow-restricted-names': 2,
 | 
					//     'no-shadow-restricted-names': 2,
 | 
				
			||||||
    'no-spaced-func': 2,
 | 
					//     'no-spaced-func': 2,
 | 
				
			||||||
    'no-sparse-arrays': 2,
 | 
					//     'no-sparse-arrays': 2,
 | 
				
			||||||
    'no-this-before-super': 2,
 | 
					//     'no-this-before-super': 2,
 | 
				
			||||||
    'no-throw-literal': 2,
 | 
					//     'no-throw-literal': 2,
 | 
				
			||||||
    'no-trailing-spaces': 2,
 | 
					//     'no-trailing-spaces': 2,
 | 
				
			||||||
    'no-undef': 2,
 | 
					//     'no-undef': 2,
 | 
				
			||||||
    'no-undef-init': 2,
 | 
					//     'no-undef-init': 2,
 | 
				
			||||||
    'no-unexpected-multiline': 2,
 | 
					//     'no-unexpected-multiline': 2,
 | 
				
			||||||
    'no-unmodified-loop-condition': 2,
 | 
					//     'no-unmodified-loop-condition': 2,
 | 
				
			||||||
    'no-unneeded-ternary': [2, {
 | 
					//     'no-unneeded-ternary': [2, {
 | 
				
			||||||
      'defaultAssignment': false
 | 
					//       'defaultAssignment': false
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'no-unreachable': 2,
 | 
					//     'no-unreachable': 2,
 | 
				
			||||||
    'no-unsafe-finally': 2,
 | 
					//     'no-unsafe-finally': 2,
 | 
				
			||||||
    'no-unused-vars': [2, {
 | 
					//     'no-unused-vars': [2, {
 | 
				
			||||||
      'vars': 'all',
 | 
					//       'vars': 'all',
 | 
				
			||||||
      'args': 'none'
 | 
					//       'args': 'none'
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'no-useless-call': 2,
 | 
					//     'no-useless-call': 2,
 | 
				
			||||||
    'no-useless-computed-key': 2,
 | 
					//     'no-useless-computed-key': 2,
 | 
				
			||||||
    'no-useless-constructor': 2,
 | 
					//     'no-useless-constructor': 2,
 | 
				
			||||||
    'no-useless-escape': 0,
 | 
					//     'no-useless-escape': 0,
 | 
				
			||||||
    'no-whitespace-before-property': 2,
 | 
					//     'no-whitespace-before-property': 2,
 | 
				
			||||||
    'no-with': 2,
 | 
					//     'no-with': 2,
 | 
				
			||||||
    'one-var': [2, {
 | 
					//     'one-var': [2, {
 | 
				
			||||||
      'initialized': 'never'
 | 
					//       'initialized': 'never'
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'operator-linebreak': [2, 'after', {
 | 
					//     'operator-linebreak': [2, 'after', {
 | 
				
			||||||
      'overrides': {
 | 
					//       'overrides': {
 | 
				
			||||||
        '?': 'before',
 | 
					//         '?': 'before',
 | 
				
			||||||
        ':': 'before'
 | 
					//         ':': 'before'
 | 
				
			||||||
      }
 | 
					//       }
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'padded-blocks': [2, 'never'],
 | 
					//     'padded-blocks': [2, 'never'],
 | 
				
			||||||
    'quotes': [2, 'single', {
 | 
					//     'quotes': [2, 'single', {
 | 
				
			||||||
      'avoidEscape': true,
 | 
					//       'avoidEscape': true,
 | 
				
			||||||
      'allowTemplateLiterals': true
 | 
					//       'allowTemplateLiterals': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'semi': [2, 'never'],
 | 
					//     'semi': [2, 'never'],
 | 
				
			||||||
    'semi-spacing': [2, {
 | 
					//     'semi-spacing': [2, {
 | 
				
			||||||
      'before': false,
 | 
					//       'before': false,
 | 
				
			||||||
      'after': true
 | 
					//       'after': true
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'space-before-blocks': [2, 'always'],
 | 
					//     'space-before-blocks': [2, 'always'],
 | 
				
			||||||
    'space-before-function-paren': [2, 'never'],
 | 
					//     'space-before-function-paren': [2, 'never'],
 | 
				
			||||||
    'space-in-parens': [2, 'never'],
 | 
					//     'space-in-parens': [2, 'never'],
 | 
				
			||||||
    'space-infix-ops': 2,
 | 
					//     'space-infix-ops': 2,
 | 
				
			||||||
    'space-unary-ops': [2, {
 | 
					//     'space-unary-ops': [2, {
 | 
				
			||||||
      'words': true,
 | 
					//       'words': true,
 | 
				
			||||||
      'nonwords': false
 | 
					//       'nonwords': false
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'spaced-comment': [2, 'always', {
 | 
					//     'spaced-comment': [2, 'always', {
 | 
				
			||||||
      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
 | 
					//       'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'template-curly-spacing': [2, 'never'],
 | 
					//     'template-curly-spacing': [2, 'never'],
 | 
				
			||||||
    'use-isnan': 2,
 | 
					//     'use-isnan': 2,
 | 
				
			||||||
    'valid-typeof': 2,
 | 
					//     'valid-typeof': 2,
 | 
				
			||||||
    'wrap-iife': [2, 'any'],
 | 
					//     'wrap-iife': [2, 'any'],
 | 
				
			||||||
    'yield-star-spacing': [2, 'both'],
 | 
					//     'yield-star-spacing': [2, 'both'],
 | 
				
			||||||
    'yoda': [2, 'never'],
 | 
					//     'yoda': [2, 'never'],
 | 
				
			||||||
    'prefer-const': 2,
 | 
					//     'prefer-const': 2,
 | 
				
			||||||
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
 | 
					//     'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
 | 
				
			||||||
    'object-curly-spacing': [2, 'always', {
 | 
					//     'object-curly-spacing': [2, 'always', {
 | 
				
			||||||
      objectsInObjects: false
 | 
					//       objectsInObjects: false
 | 
				
			||||||
    }],
 | 
					//     }],
 | 
				
			||||||
    'array-bracket-spacing': [2, 'never']
 | 
					//     'array-bracket-spacing': [2, 'never']
 | 
				
			||||||
  }
 | 
					//   }
 | 
				
			||||||
}
 | 
					// }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,14 +29,14 @@
 | 
				
			|||||||
      <el-table-column
 | 
					      <el-table-column
 | 
				
			||||||
        label="物料名称"
 | 
					        label="物料名称"
 | 
				
			||||||
        min-width="120"
 | 
					        min-width="120"
 | 
				
			||||||
        align="left"
 | 
					        align="center"
 | 
				
			||||||
        key="itemName"
 | 
					        key="itemName"
 | 
				
			||||||
        prop="itemName"
 | 
					        prop="itemName"
 | 
				
			||||||
        :show-overflow-tooltip="true"
 | 
					        :show-overflow-tooltip="true"
 | 
				
			||||||
      />
 | 
					      />
 | 
				
			||||||
      <el-table-column
 | 
					      <el-table-column
 | 
				
			||||||
        label="规格型号"
 | 
					        label="规格型号"
 | 
				
			||||||
        align="left"
 | 
					        align="center"
 | 
				
			||||||
        key="specification"
 | 
					        key="specification"
 | 
				
			||||||
        prop="specification"
 | 
					        prop="specification"
 | 
				
			||||||
        :show-overflow-tooltip="true"
 | 
					        :show-overflow-tooltip="true"
 | 
				
			||||||
@@ -48,7 +48,7 @@
 | 
				
			|||||||
        prop="unitOfMeasure"
 | 
					        prop="unitOfMeasure"
 | 
				
			||||||
        :show-overflow-tooltip="true"
 | 
					        :show-overflow-tooltip="true"
 | 
				
			||||||
      />
 | 
					      />
 | 
				
			||||||
      <el-table-column
 | 
					      <!-- <el-table-column
 | 
				
			||||||
        label="物料/产品"
 | 
					        label="物料/产品"
 | 
				
			||||||
        align="center"
 | 
					        align="center"
 | 
				
			||||||
        key="itemOrProduct"
 | 
					        key="itemOrProduct"
 | 
				
			||||||
@@ -68,7 +68,7 @@
 | 
				
			|||||||
        key="itemTypeName"
 | 
					        key="itemTypeName"
 | 
				
			||||||
        prop="itemTypeName"
 | 
					        prop="itemTypeName"
 | 
				
			||||||
        width="120"
 | 
					        width="120"
 | 
				
			||||||
      />
 | 
					      /> -->
 | 
				
			||||||
      <el-table-column label="创建时间" align="center" prop="createTime" width="160">
 | 
					      <el-table-column label="创建时间" align="center" prop="createTime" width="160">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.createTime) }}</span>
 | 
					          <span>{{ parseTime(scope.row.createTime) }}</span>
 | 
				
			||||||
@@ -162,7 +162,7 @@ export default {
 | 
				
			|||||||
      if (row) {
 | 
					      if (row) {
 | 
				
			||||||
        this.selectedRow = row;
 | 
					        this.selectedRow = row;
 | 
				
			||||||
        this.$emit("onSelected", this.selectedRow);
 | 
					        this.$emit("onSelected", this.selectedRow);
 | 
				
			||||||
        this.$emit('cancels', null)
 | 
					        this.$emit("cancels", null);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 单选选中数据
 | 
					    // 单选选中数据
 | 
				
			||||||
@@ -186,11 +186,11 @@ export default {
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.$emit("onSelected", this.selectedRow);
 | 
					      this.$emit("onSelected", this.selectedRow);
 | 
				
			||||||
      this.$emit('cancels', null)
 | 
					      this.$emit("cancels", null);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    clear() {
 | 
					    clear() {
 | 
				
			||||||
        this.$emit('cancels', null)
 | 
					      this.$emit("cancels", null);
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -60,18 +60,19 @@
 | 
				
			|||||||
          @keyup.enter.native="handleQuery"
 | 
					          @keyup.enter.native="handleQuery"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </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-form-item>
 | 
				
			||||||
        <el-button
 | 
					        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
 | 
				
			||||||
          type="primary"
 | 
					 | 
				
			||||||
          icon="el-icon-search"
 | 
					 | 
				
			||||||
          size="mini"
 | 
					 | 
				
			||||||
          @click="handleQuery"
 | 
					 | 
				
			||||||
          >搜索</el-button
 | 
					          >搜索</el-button
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
 | 
					        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
          >重置</el-button
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
    <el-table
 | 
					    <el-table
 | 
				
			||||||
@@ -91,11 +92,9 @@
 | 
				
			|||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <!-- 2024 12 19 需求五  -->
 | 
					      <!-- 2024 12 19 需求五  -->
 | 
				
			||||||
      <el-table-column label="炉号" width="180" prop="machineryName">
 | 
					      <el-table-column label="炉号" width="180" prop="machineryName"> </el-table-column>
 | 
				
			||||||
      </el-table-column>
 | 
					 | 
				
			||||||
      <!-- 2024 12 19 需求五  -->
 | 
					      <!-- 2024 12 19 需求五  -->
 | 
				
			||||||
      <el-table-column label="班组" width="180" prop="teamName">
 | 
					      <el-table-column label="班组" width="180" prop="teamName"> </el-table-column>
 | 
				
			||||||
      </el-table-column>
 | 
					 | 
				
			||||||
      <el-table-column label="工单编码" width="180" prop="workorderCode">
 | 
					      <el-table-column label="工单编码" width="180" prop="workorderCode">
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <!-- 2024 12 19 需求五 仅注释html,js部分不动,以便随时恢复 -->
 | 
					      <!-- 2024 12 19 需求五 仅注释html,js部分不动,以便随时恢复 -->
 | 
				
			||||||
@@ -121,12 +120,7 @@
 | 
				
			|||||||
        align="center"
 | 
					        align="center"
 | 
				
			||||||
        prop="sourceCode"
 | 
					        prop="sourceCode"
 | 
				
			||||||
      /> -->
 | 
					      /> -->
 | 
				
			||||||
      <el-table-column
 | 
					      <el-table-column label="产品编号" width="120" align="center" prop="productCode" />
 | 
				
			||||||
        label="产品编号"
 | 
					 | 
				
			||||||
        width="120"
 | 
					 | 
				
			||||||
        align="center"
 | 
					 | 
				
			||||||
        prop="productCode"
 | 
					 | 
				
			||||||
      />
 | 
					 | 
				
			||||||
      <el-table-column
 | 
					      <el-table-column
 | 
				
			||||||
        label="产品名称"
 | 
					        label="产品名称"
 | 
				
			||||||
        width="200"
 | 
					        width="200"
 | 
				
			||||||
@@ -150,12 +144,7 @@
 | 
				
			|||||||
        prop="clientName"
 | 
					        prop="clientName"
 | 
				
			||||||
        :show-overflow-tooltip="true"
 | 
					        :show-overflow-tooltip="true"
 | 
				
			||||||
      />
 | 
					      />
 | 
				
			||||||
      <el-table-column
 | 
					      <el-table-column label="需求日期" align="center" prop="requestDate" width="180">
 | 
				
			||||||
        label="需求日期"
 | 
					 | 
				
			||||||
        align="center"
 | 
					 | 
				
			||||||
        prop="requestDate"
 | 
					 | 
				
			||||||
        width="180"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
 | 
					          <span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,13 +9,7 @@
 | 
				
			|||||||
      <template v-if="device!=='mobile'">
 | 
					      <template v-if="device!=='mobile'">
 | 
				
			||||||
        <search id="header-search" class="right-menu-item" />
 | 
					        <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" />
 | 
					        <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;
 | 
					  let search = params;
 | 
				
			||||||
  search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
 | 
					  search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
 | 
				
			||||||
  dateRange = Array.isArray(dateRange) ? dateRange : [];
 | 
					  dateRange = Array.isArray(dateRange) ? dateRange : [];
 | 
				
			||||||
@@ -65,6 +65,7 @@ export function addDateRange(params, dateRange, propName) {
 | 
				
			|||||||
    search.params['begin' + propName] = dateRange[0];
 | 
					    search.params['begin' + propName] = dateRange[0];
 | 
				
			||||||
    search.params['end' + propName] = dateRange[1];
 | 
					    search.params['end' + propName] = dateRange[1];
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  console.log(search)
 | 
				
			||||||
  return search;
 | 
					  return search;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -308,7 +308,7 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </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组成">
 | 
					        <el-tab-pane label="BOM组成">
 | 
				
			||||||
          <ItemBom :optType="optType" :itemId="form.itemId"></ItemBom>
 | 
					          <ItemBom :optType="optType" :itemId="form.itemId"></ItemBom>
 | 
				
			||||||
        </el-tab-pane>
 | 
					        </el-tab-pane>
 | 
				
			||||||
@@ -318,7 +318,7 @@
 | 
				
			|||||||
        <el-tab-pane label="SOP">
 | 
					        <el-tab-pane label="SOP">
 | 
				
			||||||
          <SOPTab :itemId="form.itemId" :optType="optType"></SOPTab>
 | 
					          <SOPTab :itemId="form.itemId" :optType="optType"></SOPTab>
 | 
				
			||||||
        </el-tab-pane>
 | 
					        </el-tab-pane>
 | 
				
			||||||
      </el-tabs>
 | 
					      </el-tabs> -->
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <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 type="primary" @click="submitForm" v-else>确 定</el-button>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,19 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-form-item label="报工类型" prop="feedbackType">
 | 
				
			||||||
        <el-select v-model="queryParams.feedbackType" placeholder="请选择报工类型" clearable>
 | 
					        <el-select
 | 
				
			||||||
 | 
					          v-model="queryParams.feedbackType"
 | 
				
			||||||
 | 
					          placeholder="请选择报工类型"
 | 
				
			||||||
 | 
					          clearable
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
          <el-option
 | 
					          <el-option
 | 
				
			||||||
            v-for="dict in dict.type.mes_feedback_type"
 | 
					            v-for="dict in dict.type.mes_feedback_type"
 | 
				
			||||||
            :key="dict.value"
 | 
					            :key="dict.value"
 | 
				
			||||||
@@ -69,8 +80,21 @@
 | 
				
			|||||||
          />
 | 
					          />
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
@@ -83,7 +107,8 @@
 | 
				
			|||||||
          size="mini"
 | 
					          size="mini"
 | 
				
			||||||
          @click="handleAdd"
 | 
					          @click="handleAdd"
 | 
				
			||||||
          v-hasPermi="['mes:pro:feedback:add']"
 | 
					          v-hasPermi="['mes:pro:feedback:add']"
 | 
				
			||||||
        >新增</el-button>
 | 
					          >新增</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
@@ -94,7 +119,8 @@
 | 
				
			|||||||
          :disabled="single"
 | 
					          :disabled="single"
 | 
				
			||||||
          @click="handleUpdate"
 | 
					          @click="handleUpdate"
 | 
				
			||||||
          v-hasPermi="['mes:pro:feedback:edit']"
 | 
					          v-hasPermi="['mes:pro:feedback:edit']"
 | 
				
			||||||
        >修改</el-button>
 | 
					          >修改</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
@@ -105,27 +131,55 @@
 | 
				
			|||||||
          :disabled="multiple"
 | 
					          :disabled="multiple"
 | 
				
			||||||
          @click="handleDelete"
 | 
					          @click="handleDelete"
 | 
				
			||||||
          v-hasPermi="['mes:pro:feedback:remove']"
 | 
					          v-hasPermi="['mes:pro:feedback:remove']"
 | 
				
			||||||
        >删除</el-button>
 | 
					          >删除</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="报工类型" align="center" prop="feedbackType">
 | 
					      <el-table-column label="报工类型" align="center" prop="feedbackType">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="工作站" width="120px" align="center" prop="workstationName" />
 | 
					      <el-table-column
 | 
				
			||||||
      <el-table-column label="生产工单编号" width="150px" align="center" prop="workorderCode" />
 | 
					        label="工作站"
 | 
				
			||||||
      <el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
 | 
					        width="120px"
 | 
				
			||||||
      <el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" />
 | 
					        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="specification" />
 | 
				
			||||||
      <el-table-column label="报工数量" align="center" prop="quantityFeedback" />
 | 
					      <el-table-column label="报工数量" align="center" prop="quantityFeedback" />
 | 
				
			||||||
      <el-table-column label="报工人" align="center" prop="nickName" />
 | 
					      <el-table-column label="报工人" align="center" prop="nickName" />
 | 
				
			||||||
      <el-table-column label="报工时间" align="center" prop="feedbackTime" width="180">
 | 
					      <el-table-column label="报工时间" align="center" prop="feedbackTime" width="180">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.feedbackTime, '{y}-{m}-{d}') }}</span>
 | 
					          <span>{{ parseTime(scope.row.feedbackTime, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="审核人" align="center" prop="recordNick" />
 | 
					      <el-table-column label="审核人" align="center" prop="recordNick" />
 | 
				
			||||||
@@ -134,7 +188,12 @@
 | 
				
			|||||||
          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
					          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
@@ -142,7 +201,8 @@
 | 
				
			|||||||
            icon="el-icon-query"
 | 
					            icon="el-icon-query"
 | 
				
			||||||
            @click="handleView(scope.row)"
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:feedback:query']"
 | 
					            v-hasPermi="['mes:pro:feedback:query']"
 | 
				
			||||||
          >查看</el-button>
 | 
					            >查看</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
@@ -150,7 +210,8 @@
 | 
				
			|||||||
            @click="handleUpdate(scope.row)"
 | 
					            @click="handleUpdate(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:feedback:edit']"
 | 
					            v-hasPermi="['mes:pro:feedback:edit']"
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE'"
 | 
				
			||||||
          >修改</el-button>
 | 
					            >修改</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
@@ -158,7 +219,8 @@
 | 
				
			|||||||
            @click="handleDelete(scope.row)"
 | 
					            @click="handleDelete(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:feedback:remove']"
 | 
					            v-hasPermi="['mes:pro:feedback:remove']"
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE'"
 | 
				
			||||||
          >删除</el-button>
 | 
					            >删除</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
@@ -190,18 +252,34 @@
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="生产工单" prop="workorderCode">
 | 
					            <el-form-item label="生产工单" prop="workorderCode">
 | 
				
			||||||
              <el-input v-model="form.workorderCode" placeholder="请选择生产工单">
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
 | 
					            <WorkorderSelect
 | 
				
			||||||
 | 
					              ref="woSelect"
 | 
				
			||||||
 | 
					              @onSelected="onWorkorderSelected"
 | 
				
			||||||
 | 
					            ></WorkorderSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="生产任务" prop="taskCode">
 | 
					            <el-form-item label="生产任务" prop="taskCode">
 | 
				
			||||||
              <el-input v-model="form.taskCode" placeholder="请选择生产任务">
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <ProtaskSelect ref="taskSelect" :workorderId="form.workorderId" @onSelected="onTaskSelected"> </ProtaskSelect>
 | 
					            <ProtaskSelect
 | 
				
			||||||
 | 
					              ref="taskSelect"
 | 
				
			||||||
 | 
					              :workorderId="form.workorderId"
 | 
				
			||||||
 | 
					              @onSelected="onTaskSelected"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					            </ProtaskSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
@@ -224,7 +302,11 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="规格型号" prop="specification">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -236,12 +318,22 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="合格品数量" prop="quantityQualified">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="不良品数量" prop="quantityUnquanlified">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -253,7 +345,12 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="待检测数量" prop="quantityUncheck">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -261,28 +358,44 @@
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="报工人" prop="nickName">
 | 
					            <el-form-item label="报工人" prop="nickName">
 | 
				
			||||||
              <el-input v-model="form.nickName" placeholder="请选择报工人">
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
 | 
					            <UserSingleSelect
 | 
				
			||||||
 | 
					              ref="userSelect"
 | 
				
			||||||
 | 
					              @onSelected="onUserSelected"
 | 
				
			||||||
 | 
					            ></UserSingleSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="报工时间" prop="feedbackTime">
 | 
					            <el-form-item label="报工时间" prop="feedbackTime">
 | 
				
			||||||
              <el-date-picker clearable
 | 
					              <el-date-picker
 | 
				
			||||||
 | 
					                clearable
 | 
				
			||||||
                v-model="form.feedbackTime"
 | 
					                v-model="form.feedbackTime"
 | 
				
			||||||
                type="date"
 | 
					                type="date"
 | 
				
			||||||
                value-format="yyyy-MM-dd"
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
                placeholder="请选择报工时间">
 | 
					                placeholder="请选择报工时间"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="审核人" prop="recordNick">
 | 
					            <el-form-item label="审核人" prop="recordNick">
 | 
				
			||||||
              <el-input v-model="form.recordNick" placeholder="请选择审核人">
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <UserSingleSelect ref="user2Select" @onSelected="onUser2Selected"></UserSingleSelect>
 | 
					            <UserSingleSelect
 | 
				
			||||||
 | 
					              ref="user2Select"
 | 
				
			||||||
 | 
					              @onSelected="onUser2Selected"
 | 
				
			||||||
 | 
					            ></UserSingleSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
@@ -294,11 +407,36 @@
 | 
				
			|||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
 | 
					          type="primary"
 | 
				
			||||||
        <el-button type="primary" @click="handleSubmit" v-if="form.status =='PREPARE' && optType !='view' && form.recordId !=null ">提交审批</el-button>
 | 
					          @click="cancel"
 | 
				
			||||||
        <el-button type="success" @click="handleExecute" v-if="form.status =='APPROVING'  && form.recordId !=null">审批通过</el-button>
 | 
					          v-if="optType == 'view' || form.status != 'PREPARE'"
 | 
				
			||||||
        <el-button type="danger" @click="handleReject" v-if="form.status =='APPROVING'  && form.recordId !=null">审批不通过</el-button>
 | 
					          >返回</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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
@@ -306,15 +444,22 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { listFeedback, getFeedback, delFeedback, addFeedback, updateFeedback, execute } from "@/api/mes/pro/feedback";
 | 
					import {
 | 
				
			||||||
import WorkorderSelect from "@/components/workorderSelect/single.vue"
 | 
					  listFeedback,
 | 
				
			||||||
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue"
 | 
					  getFeedback,
 | 
				
			||||||
import UserSingleSelect from "@/components/userSelect/single.vue"
 | 
					  delFeedback,
 | 
				
			||||||
import ProtaskSelect from "@/components/TaskSelect/taskSelectSingle.vue"
 | 
					  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 {
 | 
					export default {
 | 
				
			||||||
  name: "Feedback",
 | 
					  name: "Feedback",
 | 
				
			||||||
  components: { WorkorderSelect, WorkstationSelect, UserSingleSelect, ProtaskSelect },
 | 
					  components: { WorkorderSelect, WorkstationSelect, UserSingleSelect, ProtaskSelect },
 | 
				
			||||||
  dicts: ['mes_order_status', 'mes_feedback_type'],
 | 
					  dicts: ["mes_order_status", "mes_feedback_type"],
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      optType: undefined,
 | 
					      optType: undefined,
 | 
				
			||||||
@@ -366,26 +511,19 @@ export default {
 | 
				
			|||||||
        recordNick: null,
 | 
					        recordNick: null,
 | 
				
			||||||
        status: null,
 | 
					        status: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        feedbackType: [
 | 
					        feedbackType: [
 | 
				
			||||||
          { required: true, message: "报工类型不能为空", trigger: "change" }
 | 
					          { required: true, message: "报工类型不能为空", trigger: "change" },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        taskCode: [
 | 
					        taskCode: [{ required: true, message: "请选择生产任务", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "请选择生产任务", trigger: "blur" }
 | 
					        workorderCode: [{ required: true, message: "生产工单不能为空", trigger: "blur" }],
 | 
				
			||||||
        ],
 | 
					        nickName: [{ required: true, message: "请选择报工人", trigger: "blur" }],
 | 
				
			||||||
        workorderCode: [
 | 
					        feedbackTime: [{ required: true, message: "请选择报工时间", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "生产工单不能为空", trigger: "blur" }
 | 
					      },
 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        nickName: [
 | 
					 | 
				
			||||||
          { required: true, message: "请选择报工人", trigger: "blur"}
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        feedbackTime: [
 | 
					 | 
				
			||||||
          { required: true, message: "请选择报工时间", trigger: "blur"}
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -395,11 +533,13 @@ export default {
 | 
				
			|||||||
    /** 查询生产报工记录列表 */
 | 
					    /** 查询生产报工记录列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listFeedback(this.queryParams).then(response => {
 | 
					      listFeedback(this.addDateRange(this.queryParams, this.dateRange)).then(
 | 
				
			||||||
 | 
					        (response) => {
 | 
				
			||||||
          this.feedbackList = response.rows;
 | 
					          this.feedbackList = response.rows;
 | 
				
			||||||
          this.total = response.total;
 | 
					          this.total = response.total;
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
      });
 | 
					        }
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 取消按钮
 | 
					    // 取消按钮
 | 
				
			||||||
    cancel() {
 | 
					    cancel() {
 | 
				
			||||||
@@ -448,12 +588,15 @@ export default {
 | 
				
			|||||||
        createBy: null,
 | 
					        createBy: null,
 | 
				
			||||||
        createTime: null,
 | 
					        createTime: null,
 | 
				
			||||||
        updateBy: null,
 | 
					        updateBy: null,
 | 
				
			||||||
        updateTime: null
 | 
					        updateTime: null,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      this.resetForm("form");
 | 
					      this.resetForm("form");
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleQuantityChanged() {
 | 
					    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() {
 | 
					    handleQuery() {
 | 
				
			||||||
@@ -462,14 +605,15 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					      this.resetForm("queryForm");
 | 
				
			||||||
      this.handleQuery();
 | 
					      this.handleQuery();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.recordId)
 | 
					      this.ids = selection.map((item) => item.recordId);
 | 
				
			||||||
      this.single = selection.length!==1
 | 
					      this.single = selection.length !== 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 新增按钮操作 */
 | 
					    /** 新增按钮操作 */
 | 
				
			||||||
    handleAdd() {
 | 
					    handleAdd() {
 | 
				
			||||||
@@ -481,8 +625,8 @@ export default {
 | 
				
			|||||||
    /** 修改按钮操作 */
 | 
					    /** 修改按钮操作 */
 | 
				
			||||||
    handleUpdate(row) {
 | 
					    handleUpdate(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const recordId = row.recordId || this.ids
 | 
					      const recordId = row.recordId || this.ids;
 | 
				
			||||||
      getFeedback(recordId).then(response => {
 | 
					      getFeedback(recordId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
        this.title = "修改生产报工记录";
 | 
					        this.title = "修改生产报工记录";
 | 
				
			||||||
@@ -493,7 +637,7 @@ export default {
 | 
				
			|||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const recordId = row.recordId || this.ids;
 | 
					      const recordId = row.recordId || this.ids;
 | 
				
			||||||
      getFeedback(recordId).then(response => {
 | 
					      getFeedback(recordId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
        this.title = "查看生产报工单信息";
 | 
					        this.title = "查看生产报工单信息";
 | 
				
			||||||
@@ -502,17 +646,16 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 提交按钮 */
 | 
					    /** 提交按钮 */
 | 
				
			||||||
    submitForm() {
 | 
					    submitForm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (this.form.recordId != null) {
 | 
					          if (this.form.recordId != null) {
 | 
				
			||||||
            updateFeedback(this.form).then(response => {
 | 
					            updateFeedback(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("修改成功");
 | 
					              this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
 | 
					 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            addFeedback(this.form).then(response => {
 | 
					            addFeedback(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("新增成功");
 | 
					              this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
@@ -522,11 +665,11 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSubmit() {
 | 
					    handleSubmit() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          this.form.status = "APPROVING";
 | 
					          this.form.status = "APPROVING";
 | 
				
			||||||
          if (this.form.recordId != null) {
 | 
					          if (this.form.recordId != null) {
 | 
				
			||||||
            updateFeedback(this.form).then(response => {
 | 
					            updateFeedback(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("提交成功");
 | 
					              this.$modal.msgSuccess("提交成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
@@ -538,19 +681,23 @@ export default {
 | 
				
			|||||||
    //审批通过执行
 | 
					    //审批通过执行
 | 
				
			||||||
    handleExecute() {
 | 
					    handleExecute() {
 | 
				
			||||||
      const recordIds = this.form.recordId;
 | 
					      const recordIds = this.form.recordId;
 | 
				
			||||||
      this.$modal.confirm('确认执行报工?').then(function() {
 | 
					      this.$modal
 | 
				
			||||||
        return execute(recordIds)//执行报工
 | 
					        .confirm("确认执行报工?")
 | 
				
			||||||
      }).then(() => {
 | 
					        .then(function () {
 | 
				
			||||||
 | 
					          return execute(recordIds); //执行报工
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("执行成功");
 | 
					          this.$modal.msgSuccess("执行成功");
 | 
				
			||||||
          this.open = false;
 | 
					          this.open = false;
 | 
				
			||||||
      }).catch(() => {});
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //审批不通过,拒绝
 | 
					    //审批不通过,拒绝
 | 
				
			||||||
    handleReject() {
 | 
					    handleReject() {
 | 
				
			||||||
      this.form.status = "PREPARE";
 | 
					      this.form.status = "PREPARE";
 | 
				
			||||||
      if (this.form.recordId != null) {
 | 
					      if (this.form.recordId != null) {
 | 
				
			||||||
        updateFeedback(this.form).then(response => {
 | 
					        updateFeedback(this.form).then((response) => {
 | 
				
			||||||
          this.$modal.msgSuccess("提交成功");
 | 
					          this.$modal.msgSuccess("提交成功");
 | 
				
			||||||
          this.open = false;
 | 
					          this.open = false;
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
@@ -560,18 +707,26 @@ export default {
 | 
				
			|||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      const recordIds = row.recordId || this.ids;
 | 
					      const recordIds = row.recordId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('是否确认删除生产报工记录编号为"' + recordIds + '"的数据项?').then(function() {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm('是否确认删除生产报工记录编号为"' + recordIds + '"的数据项?')
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return delFeedback(recordIds);
 | 
					          return delFeedback(recordIds);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => {});
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/pro/feedback/export', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/pro/feedback/export",
 | 
				
			||||||
      }, `feedback_${new Date().getTime()}.xlsx`)
 | 
					        {
 | 
				
			||||||
 | 
					          ...this.queryParams,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        `feedback_${new Date().getTime()}.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //选择生产工单
 | 
					    //选择生产工单
 | 
				
			||||||
    handleWorkorderSelect() {
 | 
					    handleWorkorderSelect() {
 | 
				
			||||||
@@ -608,7 +763,7 @@ export default {
 | 
				
			|||||||
        this.form.routeId = row.routeId;
 | 
					        this.form.routeId = row.routeId;
 | 
				
			||||||
        this.form.routeCode = row.routeCode;
 | 
					        this.form.routeCode = row.routeCode;
 | 
				
			||||||
        this.form.isCheck = row.isCheck;
 | 
					        this.form.isCheck = row.isCheck;
 | 
				
			||||||
        if(row.isCheck == 'N'){
 | 
					        if (row.isCheck == "N") {
 | 
				
			||||||
          this.form.quantityUncheck = 0;
 | 
					          this.form.quantityUncheck = 0;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.form.quantityQualified = 0;
 | 
					          this.form.quantityQualified = 0;
 | 
				
			||||||
@@ -634,6 +789,6 @@ export default {
 | 
				
			|||||||
      this.form.recordUser = row.userName;
 | 
					      this.form.recordUser = row.userName;
 | 
				
			||||||
      this.form.recordNick = row.nickName;
 | 
					      this.form.recordNick = row.nickName;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,65 +1,202 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-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>
 | 
				
			||||||
      <el-form-item label="工单名称" prop="workorderName">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="产品编码" prop="productCode">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="产品名称" prop="productName">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="设备名称" prop="machineryName">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="生产状态" prop="jobStatus">
 | 
					      <el-form-item label="生产状态" prop="jobStatus">
 | 
				
			||||||
        <el-select v-model="queryParams.jobStatus" placeholder="生产状态" clearable style="width: 240px">
 | 
					        <el-select
 | 
				
			||||||
          <el-option v-for="dict in jobStatusOptions" :key="dict.value" :label="dict.label" :value="dict.value"/>
 | 
					          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-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <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>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
 | 
					    <el-table
 | 
				
			||||||
      <el-table-column label="序号" type="index" width="80" align="center" :index="indexMethod"/>
 | 
					      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="jobCode" align="center" width="150" />
 | 
				
			||||||
      <el-table-column label="工单编码" prop="workorderCode" align="center" :show-overflow-tooltip="true"/>
 | 
					      <el-table-column
 | 
				
			||||||
      <el-table-column label="工单名称" prop="workorderName" align="center" :show-overflow-tooltip="true"/>
 | 
					        label="工单编码"
 | 
				
			||||||
      <el-table-column label="设备编码" prop="machineryCode" align="center" :show-overflow-tooltip="true"/>
 | 
					        prop="workorderCode"
 | 
				
			||||||
      <el-table-column label="设备名称" prop="machineryName" align="center" :show-overflow-tooltip="true"/>
 | 
					        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">
 | 
					      <el-table-column label="生产状态" prop="jobStatus" align="center">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-tag type="danger" v-if="scope.row.jobStatus === 'WORKING'">进行中</el-tag>
 | 
					          <el-tag type="danger" v-if="scope.row.jobStatus === 'WORKING'">进行中</el-tag>
 | 
				
			||||||
          <el-tag type="success" v-if="scope.row.jobStatus === 'FINISHED'">已完成</el-tag>
 | 
					          <el-tag type="success" v-if="scope.row.jobStatus === 'FINISHED'">已完成</el-tag>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="天然气用量" prop="gasCost" align="center" :show-overflow-tooltip="true"/>
 | 
					      <el-table-column
 | 
				
			||||||
      <el-table-column label="产品编码" prop="productCode" align="center" :show-overflow-tooltip="true"/>
 | 
					        label="天然气用量"
 | 
				
			||||||
      <el-table-column label="产品名称" prop="productName" align="center" :show-overflow-tooltip="true"/>
 | 
					        prop="gasCost"
 | 
				
			||||||
      <el-table-column label="需求日期" prop="requestDate" align="center" :show-overflow-tooltip="true"/>
 | 
					        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">
 | 
					      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <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
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['mes:pro:machineryJob:remove']">删除</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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="1080px" append-to-body>
 | 
				
			||||||
@@ -67,56 +204,99 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="设备名称">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="当前作业进度">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="工单编码">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="工单名称">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="产品编码">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="产品名称">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="客户编码">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="客户名称">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="生产状态">
 | 
					            <el-form-item label="生产状态">
 | 
				
			||||||
              <el-select v-model="form.jobStatus" placeholder="生产状态" clearable style="width: 100%" :readonly="operable">
 | 
					              <el-select
 | 
				
			||||||
                <el-option v-for="dict in jobStatusOptions" :key="dict.value" :label="dict.label" :value="dict.value"/>
 | 
					                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-select>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -124,7 +304,12 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="备注">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -133,16 +318,50 @@
 | 
				
			|||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-table :data="form.progressList">
 | 
					            <el-table :data="form.progressList">
 | 
				
			||||||
              <el-table-column label="序号" type="index" width="80" align="center" />
 | 
					              <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
 | 
				
			||||||
              <el-table-column label="流程编码" prop="progressCode" align="center" :show-overflow-tooltip="true"/>
 | 
					                label="流程名称"
 | 
				
			||||||
              <el-table-column label="开始时间" prop="startTime" align="center" :show-overflow-tooltip="true"/>
 | 
					                prop="progressName"
 | 
				
			||||||
              <el-table-column label="完成时间" prop="endTime" align="center" :show-overflow-tooltip="true"/>
 | 
					                align="center"
 | 
				
			||||||
              <el-table-column label="操作人" prop="operBy" align="center" :show-overflow-tooltip="true"/>
 | 
					                :show-overflow-tooltip="true"
 | 
				
			||||||
              <el-table-column label="操作时间" prop="operTime" 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">
 | 
					              <el-table-column label="结果" prop="progressResult" align="center">
 | 
				
			||||||
                <template slot-scope="scope">
 | 
					                <template slot-scope="scope">
 | 
				
			||||||
                  <el-tag type="danger" v-if="scope.row.progressResult == '0'">不合格</el-tag>
 | 
					                  <el-tag type="danger" v-if="scope.row.progressResult == '0'"
 | 
				
			||||||
                  <el-tag type="success" v-if="scope.row.progressResult == '1'">合格</el-tag>
 | 
					                    >不合格</el-tag
 | 
				
			||||||
 | 
					                  >
 | 
				
			||||||
 | 
					                  <el-tag type="success" v-if="scope.row.progressResult == '1'"
 | 
				
			||||||
 | 
					                    >合格</el-tag
 | 
				
			||||||
 | 
					                  >
 | 
				
			||||||
                </template>
 | 
					                </template>
 | 
				
			||||||
              </el-table-column>
 | 
					              </el-table-column>
 | 
				
			||||||
            </el-table>
 | 
					            </el-table>
 | 
				
			||||||
@@ -157,7 +376,11 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import {listProgress, getProgressByJobId, deleteProgress} from "@/api/mes/pro/machineryJob";
 | 
					import {
 | 
				
			||||||
 | 
					  listProgress,
 | 
				
			||||||
 | 
					  getProgressByJobId,
 | 
				
			||||||
 | 
					  deleteProgress,
 | 
				
			||||||
 | 
					} from "@/api/mes/pro/machineryJob";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "Index",
 | 
					  name: "Index",
 | 
				
			||||||
@@ -189,10 +412,11 @@ export default {
 | 
				
			|||||||
      jobStatusOptions: [
 | 
					      jobStatusOptions: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          value: "WORKING",
 | 
					          value: "WORKING",
 | 
				
			||||||
          label: "进行中"
 | 
					          label: "进行中",
 | 
				
			||||||
        }, {
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          value: "FINISHED",
 | 
					          value: "FINISHED",
 | 
				
			||||||
          label: "已完成"
 | 
					          label: "已完成",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      // 查询参数
 | 
					      // 查询参数
 | 
				
			||||||
@@ -209,7 +433,7 @@ export default {
 | 
				
			|||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {}
 | 
					      rules: {},
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -219,12 +443,17 @@ export default {
 | 
				
			|||||||
    /** 查询列表 */
 | 
					    /** 查询列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      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.tableList = response.rows;
 | 
				
			||||||
        this.total = response.total;
 | 
					        this.total = response.total;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
        }
 | 
					      });
 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 取消按钮
 | 
					    // 取消按钮
 | 
				
			||||||
    cancel() {
 | 
					    cancel() {
 | 
				
			||||||
@@ -261,21 +490,21 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.jobId)
 | 
					      this.ids = selection.map((item) => item.jobId);
 | 
				
			||||||
      this.single = selection.length != 1
 | 
					      this.single = selection.length != 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 序号 */
 | 
					    /** 序号 */
 | 
				
			||||||
    indexMethod(index) {
 | 
					    indexMethod(index) {
 | 
				
			||||||
      let pageNum = this.queryParams.pageNum
 | 
					      let pageNum = this.queryParams.pageNum;
 | 
				
			||||||
      let pageSize = this.queryParams.pageSize
 | 
					      let pageSize = this.queryParams.pageSize;
 | 
				
			||||||
      return (index + 1) + (pageNum - 1) * pageSize
 | 
					      return index + 1 + (pageNum - 1) * pageSize;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 查看按钮操作 */
 | 
					    /** 查看按钮操作 */
 | 
				
			||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const jobId = row.jobId || this.ids
 | 
					      const jobId = row.jobId || this.ids;
 | 
				
			||||||
      getProgressByJobId(jobId).then(response => {
 | 
					      getProgressByJobId(jobId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.operable = true;
 | 
					        this.operable = true;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
@@ -285,20 +514,27 @@ export default {
 | 
				
			|||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      const jobId = row.jobId || this.ids;
 | 
					      const jobId = row.jobId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('是否确认删除作业编码为"' + row.jobCode + '"的数据项?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm('是否确认删除作业编码为"' + row.jobCode + '"的数据项?')
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return deleteProgress(jobId);
 | 
					          return deleteProgress(jobId);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => {
 | 
					        })
 | 
				
			||||||
      });
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/pro/machineryJob/exportExcel', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/pro/machineryJob/exportExcel",
 | 
				
			||||||
      }, `生产记录.xlsx`)
 | 
					        {
 | 
				
			||||||
    }
 | 
					          ...this.queryParams,
 | 
				
			||||||
  }
 | 
					        },
 | 
				
			||||||
 | 
					        `生产记录.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,12 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-form-item label="月份" prop="reportMonth">
 | 
				
			||||||
        <el-date-picker
 | 
					        <el-date-picker
 | 
				
			||||||
          v-model="dateRange"
 | 
					          v-model="dateRange"
 | 
				
			||||||
@@ -13,20 +19,40 @@
 | 
				
			|||||||
        ></el-date-picker>
 | 
					        ></el-date-picker>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <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>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
 | 
					    <el-table
 | 
				
			||||||
      <el-table-column label="序号" type="index" width="80" align="center" :index="indexMethod"/>
 | 
					      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="reportMonth" align="center" width="150" />
 | 
				
			||||||
      <el-table-column label="原料(吨)" prop="itemQuantity" align="center" />
 | 
					      <el-table-column label="原料(吨)" prop="itemQuantity" align="center" />
 | 
				
			||||||
      <el-table-column label="成品(吨)" prop="productQuantity" 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="锌锭销量(吨)" prop="xdSale" align="center" />
 | 
				
			||||||
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
					      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </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-dialog title="编辑" :visible.sync="open" width="680px" append-to-body>
 | 
				
			||||||
      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
 | 
					      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="机修房电消耗" prop="machinePower">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -102,9 +150,10 @@ export default {
 | 
				
			|||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        machinePower: [
 | 
					        machinePower: [
 | 
				
			||||||
          { required: true, message: "机修房电消耗不能为空", trigger: "blur" }
 | 
					          { required: true, message: "机修房电消耗不能为空", trigger: "blur" },
 | 
				
			||||||
 | 
					          { pattern: /^[0-9]+(\.[0-9]+)?$/, message: "请输入数字", trigger: "blur" }
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
      }
 | 
					      },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -114,12 +163,11 @@ export default {
 | 
				
			|||||||
    /** 查询列表 */
 | 
					    /** 查询列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      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.tableList = response.rows;
 | 
				
			||||||
        this.total = response.total;
 | 
					        this.total = response.total;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
        }
 | 
					      });
 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 取消按钮
 | 
					    // 取消按钮
 | 
				
			||||||
    cancel() {
 | 
					    cancel() {
 | 
				
			||||||
@@ -127,13 +175,13 @@ export default {
 | 
				
			|||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    confirm() {
 | 
					    confirm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          edit(this.form).then(response => {
 | 
					          edit(this.form).then((response) => {
 | 
				
			||||||
            this.$modal.msgSuccess("操作成功")
 | 
					            this.$modal.msgSuccess("操作成功");
 | 
				
			||||||
            this.open = false
 | 
					            this.open = false;
 | 
				
			||||||
            this.getList()
 | 
					            this.getList();
 | 
				
			||||||
          })
 | 
					          });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -158,30 +206,34 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.jobId)
 | 
					      this.ids = selection.map((item) => item.jobId);
 | 
				
			||||||
      this.single = selection.length != 1
 | 
					      this.single = selection.length != 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 序号 */
 | 
					    /** 序号 */
 | 
				
			||||||
    indexMethod(index) {
 | 
					    indexMethod(index) {
 | 
				
			||||||
      let pageNum = this.queryParams.pageNum
 | 
					      let pageNum = this.queryParams.pageNum;
 | 
				
			||||||
      let pageSize = this.queryParams.pageSize
 | 
					      let pageSize = this.queryParams.pageSize;
 | 
				
			||||||
      return (index + 1) + (pageNum - 1) * pageSize
 | 
					      return index + 1 + (pageNum - 1) * pageSize;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 编辑按钮操作 */
 | 
					    /** 编辑按钮操作 */
 | 
				
			||||||
    handleEdit(row) {
 | 
					    handleEdit(row) {
 | 
				
			||||||
      this.form = {
 | 
					      this.form = {
 | 
				
			||||||
        id: row.id,
 | 
					        id: row.id,
 | 
				
			||||||
        machinePower: row.machinePower,
 | 
					        machinePower: row.machinePower,
 | 
				
			||||||
      }
 | 
					      };
 | 
				
			||||||
      this.open = true
 | 
					      this.open = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/pro/monthReport/exportExcel', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/pro/monthReport/exportExcel",
 | 
				
			||||||
      }, `生产月报表.xlsx`)
 | 
					        {
 | 
				
			||||||
    }
 | 
					          ...this.queryParams,
 | 
				
			||||||
  }
 | 
					        },
 | 
				
			||||||
 | 
					        `生产月报表.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,13 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-form-item label="工序编码" prop="processCode">
 | 
				
			||||||
        <el-input
 | 
					        <el-input
 | 
				
			||||||
          v-model="queryParams.processCode"
 | 
					          v-model="queryParams.processCode"
 | 
				
			||||||
@@ -25,8 +32,21 @@
 | 
				
			|||||||
          @keyup.enter.native="handleQuery"
 | 
					          @keyup.enter.native="handleQuery"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
@@ -40,7 +60,8 @@
 | 
				
			|||||||
          size="mini"
 | 
					          size="mini"
 | 
				
			||||||
          @click="handleAdd"
 | 
					          @click="handleAdd"
 | 
				
			||||||
          v-hasPermi="['mes:pro:process:add']"
 | 
					          v-hasPermi="['mes:pro:process:add']"
 | 
				
			||||||
        >新增</el-button>
 | 
					          >新增</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
@@ -51,7 +72,8 @@
 | 
				
			|||||||
          :disabled="single"
 | 
					          :disabled="single"
 | 
				
			||||||
          @click="handleUpdate"
 | 
					          @click="handleUpdate"
 | 
				
			||||||
          v-hasPermi="['mes:pro:process:edit']"
 | 
					          v-hasPermi="['mes:pro:process:edit']"
 | 
				
			||||||
        >修改</el-button>
 | 
					          >修改</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
@@ -62,7 +84,8 @@
 | 
				
			|||||||
          :disabled="multiple"
 | 
					          :disabled="multiple"
 | 
				
			||||||
          @click="handleDelete"
 | 
					          @click="handleDelete"
 | 
				
			||||||
          v-hasPermi="['mes:pro:process:remove']"
 | 
					          v-hasPermi="['mes:pro:process:remove']"
 | 
				
			||||||
        >删除</el-button>
 | 
					          >删除</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
@@ -72,12 +95,17 @@
 | 
				
			|||||||
          size="mini"
 | 
					          size="mini"
 | 
				
			||||||
          @click="handleExport"
 | 
					          @click="handleExport"
 | 
				
			||||||
          v-hasPermi="['mes:pro:process:export']"
 | 
					          v-hasPermi="['mes:pro:process:export']"
 | 
				
			||||||
        >导出</el-button>
 | 
					          >导出</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="工序编码" align="center" prop="processCode">
 | 
					      <el-table-column label="工序编码" align="center" prop="processCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
@@ -85,16 +113,27 @@
 | 
				
			|||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleView(scope.row)"
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:process:query']"
 | 
					            v-hasPermi="['mes:pro:process:query']"
 | 
				
			||||||
          >{{scope.row.processCode}}</el-button>
 | 
					            >{{ scope.row.processCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					      <el-table-column label="是否启用" align="center" prop="enableFlag">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag" />
 | 
					          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
@@ -103,14 +142,16 @@
 | 
				
			|||||||
            icon="el-icon-edit"
 | 
					            icon="el-icon-edit"
 | 
				
			||||||
            @click="handleUpdate(scope.row)"
 | 
					            @click="handleUpdate(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:process:edit']"
 | 
					            v-hasPermi="['mes:pro:process:edit']"
 | 
				
			||||||
          >修改</el-button>
 | 
					            >修改</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
            icon="el-icon-delete"
 | 
					            icon="el-icon-delete"
 | 
				
			||||||
            @click="handleDelete(scope.row)"
 | 
					            @click="handleDelete(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:process:remove']"
 | 
					            v-hasPermi="['mes:pro:process:remove']"
 | 
				
			||||||
          >删除</el-button>
 | 
					            >删除</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
@@ -134,10 +175,13 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="3">
 | 
					          <el-col :span="3">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag"
 | 
					              <el-switch
 | 
				
			||||||
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
                active-color="#13ce66"
 | 
					                active-color="#13ce66"
 | 
				
			||||||
                active-text="自动生成"
 | 
					                active-text="自动生成"
 | 
				
			||||||
                  @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view'">
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -153,14 +197,16 @@
 | 
				
			|||||||
                  v-for="dict in dict.type.sys_yes_no"
 | 
					                  v-for="dict in dict.type.sys_yes_no"
 | 
				
			||||||
                  :key="dict.value"
 | 
					                  :key="dict.value"
 | 
				
			||||||
                  :label="dict.value"
 | 
					                  :label="dict.value"
 | 
				
			||||||
                >{{dict.label}}</el-radio>
 | 
					                  >{{ dict.label }}</el-radio
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
              </el-radio-group>
 | 
					              </el-radio-group>
 | 
				
			||||||
              <el-radio-group v-model="form.enableFlag" v-else>
 | 
					              <el-radio-group v-model="form.enableFlag" v-else>
 | 
				
			||||||
                <el-radio
 | 
					                <el-radio
 | 
				
			||||||
                  v-for="dict in dict.type.sys_yes_no"
 | 
					                  v-for="dict in dict.type.sys_yes_no"
 | 
				
			||||||
                  :key="dict.value"
 | 
					                  :key="dict.value"
 | 
				
			||||||
                  :label="dict.value"
 | 
					                  :label="dict.value"
 | 
				
			||||||
                >{{dict.label}}</el-radio>
 | 
					                  >{{ dict.label }}</el-radio
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
              </el-radio-group>
 | 
					              </el-radio-group>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -168,7 +214,11 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="工序说明" prop="attention">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -180,10 +230,18 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <el-divider content-position="center" v-if="form.processId !=null">操作步骤</el-divider>
 | 
					      <el-divider content-position="center" v-if="form.processId != null"
 | 
				
			||||||
      <Processcontent v-if="form.processId !=null" :optType="optType" :processId="form.processId"></Processcontent>
 | 
					        >操作步骤</el-divider
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					      <Processcontent
 | 
				
			||||||
 | 
					        v-if="form.processId != null"
 | 
				
			||||||
 | 
					        :optType="optType"
 | 
				
			||||||
 | 
					        :processId="form.processId"
 | 
				
			||||||
 | 
					      ></Processcontent>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <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 type="primary" @click="submitForm" v-else>确 定</el-button>
 | 
				
			||||||
        <el-button @click="cancel">取 消</el-button>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@@ -192,12 +250,18 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<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 Processcontent from "./content.vue";
 | 
				
			||||||
import {genCode} from "@/api/system/autocode/rule"
 | 
					import { genCode } from "@/api/system/autocode/rule";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "Process",
 | 
					  name: "Process",
 | 
				
			||||||
  dicts: ['sys_yes_no'],
 | 
					  dicts: ["sys_yes_no"],
 | 
				
			||||||
  components: { Processcontent },
 | 
					  components: { Processcontent },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -230,20 +294,15 @@ export default {
 | 
				
			|||||||
        processName: null,
 | 
					        processName: null,
 | 
				
			||||||
        enableFlag: null,
 | 
					        enableFlag: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        processCode: [
 | 
					        processCode: [{ required: true, message: "工序编码不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "工序编码不能为空", trigger: "blur" }
 | 
					        processName: [{ required: true, message: "工序名称不能为空", trigger: "blur" }],
 | 
				
			||||||
        ],
 | 
					        enableFlag: [{ required: true, message: "是否启用不能为空", trigger: "blur" }],
 | 
				
			||||||
        processName: [
 | 
					      },
 | 
				
			||||||
          { required: true, message: "工序名称不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        enableFlag: [
 | 
					 | 
				
			||||||
          { required: true, message: "是否启用不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -253,7 +312,7 @@ export default {
 | 
				
			|||||||
    /** 查询生产工序列表 */
 | 
					    /** 查询生产工序列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listProcess(this.queryParams).then(response => {
 | 
					      listProcess(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
 | 
				
			||||||
        this.processList = response.rows;
 | 
					        this.processList = response.rows;
 | 
				
			||||||
        this.total = response.total;
 | 
					        this.total = response.total;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
@@ -271,12 +330,12 @@ export default {
 | 
				
			|||||||
        processCode: null,
 | 
					        processCode: null,
 | 
				
			||||||
        processName: null,
 | 
					        processName: null,
 | 
				
			||||||
        attention: null,
 | 
					        attention: null,
 | 
				
			||||||
        enableFlag: 'Y',
 | 
					        enableFlag: "Y",
 | 
				
			||||||
        remark: null,
 | 
					        remark: null,
 | 
				
			||||||
        createBy: null,
 | 
					        createBy: null,
 | 
				
			||||||
        createTime: null,
 | 
					        createTime: null,
 | 
				
			||||||
        updateBy: null,
 | 
					        updateBy: null,
 | 
				
			||||||
        updateTime: null
 | 
					        updateTime: null,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      this.autoGenFlag = false;
 | 
					      this.autoGenFlag = false;
 | 
				
			||||||
      this.resetForm("form");
 | 
					      this.resetForm("form");
 | 
				
			||||||
@@ -293,9 +352,9 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.processId)
 | 
					      this.ids = selection.map((item) => item.processId);
 | 
				
			||||||
      this.single = selection.length!==1
 | 
					      this.single = selection.length !== 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 新增按钮操作 */
 | 
					    /** 新增按钮操作 */
 | 
				
			||||||
    handleAdd() {
 | 
					    handleAdd() {
 | 
				
			||||||
@@ -308,7 +367,7 @@ export default {
 | 
				
			|||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const processId = row.processId || this.ids;
 | 
					      const processId = row.processId || this.ids;
 | 
				
			||||||
      getProcess(processId).then(response => {
 | 
					      getProcess(processId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
        this.title = "查看工序信息";
 | 
					        this.title = "查看工序信息";
 | 
				
			||||||
@@ -318,8 +377,8 @@ export default {
 | 
				
			|||||||
    /** 修改按钮操作 */
 | 
					    /** 修改按钮操作 */
 | 
				
			||||||
    handleUpdate(row) {
 | 
					    handleUpdate(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const processId = row.processId || this.ids
 | 
					      const processId = row.processId || this.ids;
 | 
				
			||||||
      getProcess(processId).then(response => {
 | 
					      getProcess(processId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
        this.title = "修改生产工序";
 | 
					        this.title = "修改生产工序";
 | 
				
			||||||
@@ -328,16 +387,16 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 提交按钮 */
 | 
					    /** 提交按钮 */
 | 
				
			||||||
    submitForm() {
 | 
					    submitForm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (this.form.processId != null) {
 | 
					          if (this.form.processId != null) {
 | 
				
			||||||
            updateProcess(this.form).then(response => {
 | 
					            updateProcess(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("修改成功");
 | 
					              this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            addProcess(this.form).then(response => {
 | 
					            addProcess(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("新增成功");
 | 
					              this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
@@ -349,29 +408,37 @@ export default {
 | 
				
			|||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      const processIds = row.processId || this.ids;
 | 
					      const processIds = row.processId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('是否确认删除生产工序?').then(function() {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm("是否确认删除生产工序?")
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return delProcess(processIds);
 | 
					          return delProcess(processIds);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => {});
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/pro/process/export', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/pro/process/export",
 | 
				
			||||||
      }, `生产工序数据.xlsx`)
 | 
					        {
 | 
				
			||||||
 | 
					          ...this.queryParams,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        `生产工序数据.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //自动生成编码
 | 
					    //自动生成编码
 | 
				
			||||||
    handleAutoGenChange(autoGenFlag) {
 | 
					    handleAutoGenChange(autoGenFlag) {
 | 
				
			||||||
      if (autoGenFlag) {
 | 
					      if (autoGenFlag) {
 | 
				
			||||||
        genCode('PROCESS_CODE').then(response =>{
 | 
					        genCode("PROCESS_CODE").then((response) => {
 | 
				
			||||||
          this.form.processCode = response;
 | 
					          this.form.processCode = response;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        this.form.processCode = null;
 | 
					        this.form.processCode = null;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,13 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-form-item label="工单编码" prop="workorderCode">
 | 
				
			||||||
        <el-input
 | 
					        <el-input
 | 
				
			||||||
          v-model="queryParams.workorderCode"
 | 
					          v-model="queryParams.workorderCode"
 | 
				
			||||||
@@ -60,20 +67,37 @@
 | 
				
			|||||||
        />
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <el-form-item label="需求日期" prop="requestDate">
 | 
					      <el-form-item label="需求日期" prop="requestDate">
 | 
				
			||||||
        <el-date-picker clearable
 | 
					        <el-date-picker
 | 
				
			||||||
          v-model="queryParams.requestDate"
 | 
					          v-model="dateRange"
 | 
				
			||||||
          type="date"
 | 
					          style="width: 240px"
 | 
				
			||||||
          value-format="yyyy-MM-dd"
 | 
					          value-format="yyyy-MM-dd"
 | 
				
			||||||
          placeholder="请选择需求日期">
 | 
					          type="daterange"
 | 
				
			||||||
        </el-date-picker>
 | 
					          range-separator="-"
 | 
				
			||||||
 | 
					          start-placeholder="开始日期"
 | 
				
			||||||
 | 
					          end-placeholder="结束日期"
 | 
				
			||||||
 | 
					        ></el-date-picker>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <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
 | 
				
			||||||
        <el-button type="primary" icon="el-icon-edit" v-hasPermi="['mes:pro:protask:edit']" circle="" @click="handleOpenGantt"></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-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
    <div class="wrapper">
 | 
					    <div class="wrapper">
 | 
				
			||||||
@@ -95,28 +119,59 @@
 | 
				
			|||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleView(scope.row)"
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:protask:query']"
 | 
					            v-hasPermi="['mes:pro:protask:query']"
 | 
				
			||||||
          >{{scope.row.workorderCode}}</el-button>
 | 
					            >{{ scope.row.workorderCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					      <el-table-column label="工单来源" align="center" prop="orderSource">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="订单编号" width="140" align="center" prop="sourceCode" />
 | 
					      <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="120" align="center" prop="productCode" />
 | 
				
			||||||
      <el-table-column label="产品名称" width="200" align="center" prop="productName" :show-overflow-tooltip="true"/>
 | 
					      <el-table-column
 | 
				
			||||||
      <el-table-column label="规格型号" align="center" prop="productSpc" :show-overflow-tooltip="true"/>
 | 
					        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="unitOfMeasure" />
 | 
				
			||||||
      <el-table-column label="工单数量" align="center" prop="quantity" />
 | 
					      <el-table-column label="工单数量" align="center" prop="quantity" />
 | 
				
			||||||
      <el-table-column label="调整数量" align="center" prop="quantityChanged" />
 | 
					      <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="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">
 | 
					      <el-table-column label="需求日期" align="center" prop="requestDate" width="180">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.requestDate, '{y}-{m}-{d}') }}</span>
 | 
					          <span>{{ parseTime(scope.row.requestDate, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="排产状态" align="center" prop="status">
 | 
					      <el-table-column label="排产状态" align="center" prop="status">
 | 
				
			||||||
@@ -124,7 +179,12 @@
 | 
				
			|||||||
          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
					          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
@@ -133,7 +193,8 @@
 | 
				
			|||||||
            v-if="scope.row.status == 'CONFIRMED'"
 | 
					            v-if="scope.row.status == 'CONFIRMED'"
 | 
				
			||||||
            @click="handleUpdate(scope.row)"
 | 
					            @click="handleUpdate(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:protask:edit']"
 | 
					            v-hasPermi="['mes:pro:protask:edit']"
 | 
				
			||||||
          >排产</el-button>
 | 
					            >排产</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
@@ -169,7 +230,8 @@
 | 
				
			|||||||
                  v-for="dict in dict.type.mes_workorder_sourcetype"
 | 
					                  v-for="dict in dict.type.mes_workorder_sourcetype"
 | 
				
			||||||
                  :key="dict.value"
 | 
					                  :key="dict.value"
 | 
				
			||||||
                  :label="dict.value"
 | 
					                  :label="dict.value"
 | 
				
			||||||
                >{{dict.label}}</el-radio>
 | 
					                  >{{ dict.label }}</el-radio
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
              </el-radio-group>
 | 
					              </el-radio-group>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -194,8 +256,7 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="产品编号" prop="productCode">
 | 
					            <el-form-item label="产品编号" prop="productCode">
 | 
				
			||||||
              <el-input v-model="form.productCode" readonly="readonly" >
 | 
					              <el-input v-model="form.productCode" readonly="readonly"> </el-input>
 | 
				
			||||||
              </el-input>
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
@@ -224,11 +285,13 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="需求日期" prop="requestDate">
 | 
					            <el-form-item label="需求日期" prop="requestDate">
 | 
				
			||||||
              <el-date-picker disabled
 | 
					              <el-date-picker
 | 
				
			||||||
 | 
					                disabled
 | 
				
			||||||
                v-model="form.requestDate"
 | 
					                v-model="form.requestDate"
 | 
				
			||||||
                type="date"
 | 
					                type="date"
 | 
				
			||||||
                value-format="yyyy-MM-dd"
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
                placeholder="请选择需求日期">
 | 
					                placeholder="请选择需求日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -236,8 +299,7 @@
 | 
				
			|||||||
        <el-row v-if="form.orderSource == 'ORDER'">
 | 
					        <el-row v-if="form.orderSource == 'ORDER'">
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="客户编号" prop="clientCode">
 | 
					            <el-form-item label="客户编号" prop="clientCode">
 | 
				
			||||||
              <el-input v-model="form.clientCode" readonly="readonly" >
 | 
					              <el-input v-model="form.clientCode" readonly="readonly"> </el-input>
 | 
				
			||||||
              </el-input>
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
@@ -255,18 +317,51 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <el-steps :active="activeProcess" v-if="form.workorderId !=null" align-center simple>
 | 
					      <el-steps
 | 
				
			||||||
        <el-step  v-for="(item,index) in processOptions"
 | 
					        :active="activeProcess"
 | 
				
			||||||
                  :title="item.processName" @click.native="handleStepClick(index)">           
 | 
					        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-step>
 | 
				
			||||||
      </el-steps>
 | 
					      </el-steps>
 | 
				
			||||||
      <el-card v-for=" (item,index) in processOptions " :key="index" v-if="activeProcess == index && form.workorderId !=null">
 | 
					      <el-card
 | 
				
			||||||
        <ProTask :workorderId="form.workorderId" :routeId="item.routeId" :processId="item.processId" :colorCode="item.colorCode" :optType="optType"></ProTask>
 | 
					        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>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">确 定</el-button>
 | 
					          type="primary"
 | 
				
			||||||
        <el-button type="success" @click="handleFinish" v-if="form.status =='PREPARE' && optType !='view'  && form.workorderId !=null">完成</el-button>
 | 
					          @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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
@@ -274,7 +369,13 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<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 { listGanttTaskList } from "@/api/mes/pro/protask";
 | 
				
			||||||
import { listProductprocess } from "@/api/mes/pro/routeprocess";
 | 
					import { listProductprocess } from "@/api/mes/pro/routeprocess";
 | 
				
			||||||
import ProTask from "./proTask.vue";
 | 
					import ProTask from "./proTask.vue";
 | 
				
			||||||
@@ -284,11 +385,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "Workorder",
 | 
					  name: "Workorder",
 | 
				
			||||||
  dicts: ['mes_order_status','mes_workorder_sourcetype'],
 | 
					  dicts: ["mes_order_status", "mes_workorder_sourcetype"],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    Treeselect,
 | 
					    Treeselect,
 | 
				
			||||||
    ProTask,
 | 
					    ProTask,
 | 
				
			||||||
    GanttChar
 | 
					    GanttChar,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -322,7 +423,7 @@ export default {
 | 
				
			|||||||
        pageSize: 10,
 | 
					        pageSize: 10,
 | 
				
			||||||
        workorderCode: null,
 | 
					        workorderCode: null,
 | 
				
			||||||
        workorderName: null,
 | 
					        workorderName: null,
 | 
				
			||||||
        workorderType: 'SELF', //这里的排产要排除自产之外的外协和外购
 | 
					        workorderType: "SELF", //这里的排产要排除自产之外的外协和外购
 | 
				
			||||||
        orderSource: null,
 | 
					        orderSource: null,
 | 
				
			||||||
        sourceCode: null,
 | 
					        sourceCode: null,
 | 
				
			||||||
        productId: null,
 | 
					        productId: null,
 | 
				
			||||||
@@ -340,11 +441,12 @@ export default {
 | 
				
			|||||||
        requestDate: null,
 | 
					        requestDate: null,
 | 
				
			||||||
        parentId: null,
 | 
					        parentId: null,
 | 
				
			||||||
        ancestors: null,
 | 
					        ancestors: null,
 | 
				
			||||||
        status: 'CONFIRMED',
 | 
					        status: "CONFIRMED",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      tasks: {
 | 
					      tasks: {
 | 
				
			||||||
        data: [],
 | 
					        data: [],
 | 
				
			||||||
        links: []
 | 
					        links: [],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
@@ -358,17 +460,19 @@ export default {
 | 
				
			|||||||
    /** 查询生产工单列表 */
 | 
					    /** 查询生产工单列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      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.workorderList = this.handleTree(response.rows, "workorderId", "parentId");
 | 
				
			||||||
          this.total = response.total;
 | 
					          this.total = response.total;
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
      });
 | 
					        }
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleOpenGantt() {
 | 
					    handleOpenGantt() {
 | 
				
			||||||
      this.$router.push({ path: '/mes/pro/schedule/ganttedit'})
 | 
					      this.$router.push({ path: "/mes/pro/schedule/ganttedit" });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getGanttTasks() {
 | 
					    getGanttTasks() {
 | 
				
			||||||
      listGanttTaskList(this.queryParams).then(response =>{
 | 
					      listGanttTaskList(this.queryParams).then((response) => {
 | 
				
			||||||
        this.tasks.data = response.data.data;
 | 
					        this.tasks.data = response.data.data;
 | 
				
			||||||
        this.tasks.links = response.data.links;
 | 
					        this.tasks.links = response.data.links;
 | 
				
			||||||
        this.$refs.ganttChar.reload();
 | 
					        this.$refs.ganttChar.reload();
 | 
				
			||||||
@@ -377,7 +481,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    //获取当前产品对应的生产工序
 | 
					    //获取当前产品对应的生产工序
 | 
				
			||||||
    getProcess() {
 | 
					    getProcess() {
 | 
				
			||||||
        listProductprocess(this.form.productId).then(response =>{
 | 
					      listProductprocess(this.form.productId).then((response) => {
 | 
				
			||||||
        this.processOptions = response.data;
 | 
					        this.processOptions = response.data;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -390,14 +494,14 @@ export default {
 | 
				
			|||||||
      return {
 | 
					      return {
 | 
				
			||||||
        id: node.workorderId,
 | 
					        id: node.workorderId,
 | 
				
			||||||
        label: node.workorderName,
 | 
					        label: node.workorderName,
 | 
				
			||||||
        children: node.children
 | 
					        children: node.children,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 查询生产工单下拉树结构 */
 | 
					    /** 查询生产工单下拉树结构 */
 | 
				
			||||||
    getTreeselect() {
 | 
					    getTreeselect() {
 | 
				
			||||||
      listWorkorder().then(response => {
 | 
					      listWorkorder().then((response) => {
 | 
				
			||||||
        this.workorderOptions = [];
 | 
					        this.workorderOptions = [];
 | 
				
			||||||
        const data = { workorderId: 0, workorderName: '顶级节点', children: [] };
 | 
					        const data = { workorderId: 0, workorderName: "顶级节点", children: [] };
 | 
				
			||||||
        data.children = this.handleTree(response.data, "workorderId", "parentId");
 | 
					        data.children = this.handleTree(response.data, "workorderId", "parentId");
 | 
				
			||||||
        this.workorderOptions.push(data);
 | 
					        this.workorderOptions.push(data);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@@ -434,7 +538,7 @@ export default {
 | 
				
			|||||||
        createBy: null,
 | 
					        createBy: null,
 | 
				
			||||||
        createTime: null,
 | 
					        createTime: null,
 | 
				
			||||||
        updateBy: null,
 | 
					        updateBy: null,
 | 
				
			||||||
        updateTime: null        
 | 
					        updateTime: null,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      this.activeProcess = 0;
 | 
					      this.activeProcess = 0;
 | 
				
			||||||
      this.autoGenFlag = false;
 | 
					      this.autoGenFlag = false;
 | 
				
			||||||
@@ -454,6 +558,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					      this.resetForm("queryForm");
 | 
				
			||||||
      this.handleQuery();
 | 
					      this.handleQuery();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -497,7 +602,7 @@ export default {
 | 
				
			|||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      this.getTreeselect();
 | 
					      this.getTreeselect();
 | 
				
			||||||
      const workorderId = row.workorderId || this.ids;
 | 
					      const workorderId = row.workorderId || this.ids;
 | 
				
			||||||
      getWorkorder(workorderId).then(response => {
 | 
					      getWorkorder(workorderId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.getProcess();
 | 
					        this.getProcess();
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
@@ -512,7 +617,7 @@ export default {
 | 
				
			|||||||
      if (row != null) {
 | 
					      if (row != null) {
 | 
				
			||||||
        this.form.parentId = row.workorderId;
 | 
					        this.form.parentId = row.workorderId;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      getWorkorder(row.workorderId).then(response => {
 | 
					      getWorkorder(row.workorderId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.getProcess();
 | 
					        this.getProcess();
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
@@ -522,17 +627,17 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 提交按钮 */
 | 
					    /** 提交按钮 */
 | 
				
			||||||
    submitForm() {
 | 
					    submitForm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (this.form.workorderId != null) {
 | 
					          if (this.form.workorderId != null) {
 | 
				
			||||||
            updateWorkorder(this.form).then(response => {
 | 
					            updateWorkorder(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("修改成功");
 | 
					              this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
              //this.open = false;
 | 
					              //this.open = false;
 | 
				
			||||||
              this.$refs["bomlist"].getList();
 | 
					              this.$refs["bomlist"].getList();
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            addWorkorder(this.form).then(response => {
 | 
					            addWorkorder(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("新增成功");
 | 
					              this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
              //this.open = false;
 | 
					              //this.open = false;
 | 
				
			||||||
              this.form.workorderId = response.data;
 | 
					              this.form.workorderId = response.data;
 | 
				
			||||||
@@ -544,12 +649,16 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      this.$modal.confirm('是否确认删除生产工单编号为"' + row.workorderId + '"的数据项?').then(function() {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm('是否确认删除生产工单编号为"' + row.workorderId + '"的数据项?')
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return delWorkorder(row.workorderId);
 | 
					          return delWorkorder(row.workorderId);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => {});
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleSelectProduct() {
 | 
					    handleSelectProduct() {
 | 
				
			||||||
      this.$refs.itemSelect.showFlag = true;
 | 
					      this.$refs.itemSelect.showFlag = true;
 | 
				
			||||||
@@ -559,14 +668,18 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/pro/workorder/export', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/pro/workorder/export",
 | 
				
			||||||
      }, `workorder_${new Date().getTime()}.xlsx`)
 | 
					        {
 | 
				
			||||||
 | 
					          ...this.queryParams,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        `workorder_${new Date().getTime()}.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleFinish() {
 | 
					    handleFinish() {
 | 
				
			||||||
      let that = this;
 | 
					      let that = this;
 | 
				
			||||||
      this.$modal.confirm('是否完成工单编制?【完成后将不能更改】').then(function(){
 | 
					      this.$modal.confirm("是否完成工单编制?【完成后将不能更改】").then(function () {
 | 
				
			||||||
        that.form.status = 'CONFIRMED';
 | 
					        that.form.status = "CONFIRMED";
 | 
				
			||||||
        that.submitForm();
 | 
					        that.submitForm();
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -591,14 +704,14 @@ export default {
 | 
				
			|||||||
    //自动生成编码
 | 
					    //自动生成编码
 | 
				
			||||||
    handleAutoGenChange(autoGenFlag) {
 | 
					    handleAutoGenChange(autoGenFlag) {
 | 
				
			||||||
      if (autoGenFlag) {
 | 
					      if (autoGenFlag) {
 | 
				
			||||||
        genCode('WORKORDER_CODE').then(response =>{
 | 
					        genCode("WORKORDER_CODE").then((response) => {
 | 
				
			||||||
          this.form.workorderCode = response;
 | 
					          this.form.workorderCode = response;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        this.form.workorderCode = null;
 | 
					        this.form.workorderCode = null;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -246,7 +246,7 @@
 | 
				
			|||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
            type="text"
 | 
					            type="text"
 | 
				
			||||||
            icon="el-icon-edit"
 | 
					            icon="el-icon-edit"
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE' || scope.row.status == 'CONFIRMED'"
 | 
				
			||||||
            @click="handleUpdate(scope.row)"
 | 
					            @click="handleUpdate(scope.row)"
 | 
				
			||||||
            v-hasPermi="['mes:pro:workorder:edit']"
 | 
					            v-hasPermi="['mes:pro:workorder:edit']"
 | 
				
			||||||
            >修改</el-button
 | 
					            >修改</el-button
 | 
				
			||||||
@@ -295,7 +295,7 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="工单编号" prop="workorderCode" >
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
@@ -358,7 +358,7 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="单据状态" prop="status">
 | 
					            <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
 | 
					                <el-option
 | 
				
			||||||
                  v-for="dict in dict.type.mes_order_status"
 | 
					                  v-for="dict in dict.type.mes_order_status"
 | 
				
			||||||
                  :key="dict.value"
 | 
					                  :key="dict.value"
 | 
				
			||||||
@@ -416,7 +416,7 @@
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="工单数量" prop="quantity">
 | 
					            <el-form-item label="工单数量" prop="quantity">
 | 
				
			||||||
              <el-input-number
 | 
					              <el-input-number
 | 
				
			||||||
                disabled
 | 
					                :disabled="form.status !== 'CONFIRMED'"
 | 
				
			||||||
                :min="1"
 | 
					                :min="1"
 | 
				
			||||||
                v-model="form.quantity"
 | 
					                v-model="form.quantity"
 | 
				
			||||||
                placeholder="请输入生产数量"
 | 
					                placeholder="请输入生产数量"
 | 
				
			||||||
@@ -465,7 +465,7 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="班组" prop="teamName">
 | 
					            <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
 | 
					                <el-button
 | 
				
			||||||
                  slot="append"
 | 
					                  slot="append"
 | 
				
			||||||
                  @click="handleSelectTeam"
 | 
					                  @click="handleSelectTeam"
 | 
				
			||||||
@@ -540,7 +540,7 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </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组成">
 | 
					        <el-tab-pane label="BOM组成">
 | 
				
			||||||
          <Workorderbom
 | 
					          <Workorderbom
 | 
				
			||||||
            ref="bomlist"
 | 
					            ref="bomlist"
 | 
				
			||||||
@@ -550,7 +550,7 @@
 | 
				
			|||||||
          ></Workorderbom>
 | 
					          ></Workorderbom>
 | 
				
			||||||
        </el-tab-pane>
 | 
					        </el-tab-pane>
 | 
				
			||||||
        <el-tab-pane label="物料需求"> </el-tab-pane>
 | 
					        <el-tab-pane label="物料需求"> </el-tab-pane>
 | 
				
			||||||
      </el-tabs>
 | 
					      </el-tabs> -->
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
          type="primary"
 | 
					          type="primary"
 | 
				
			||||||
@@ -561,7 +561,7 @@
 | 
				
			|||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
          type="primary"
 | 
					          type="primary"
 | 
				
			||||||
          @click="submitForm"
 | 
					          @click="submitForm"
 | 
				
			||||||
          v-if="form.status == 'PREPARE' && optType != 'view'"
 | 
					          v-if="form.status == 'PREPARE' || title == '修改生产工单'  && optType != 'view'"
 | 
				
			||||||
          >保 存</el-button
 | 
					          >保 存</el-button
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
        <el-button
 | 
					        <el-button
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,66 +1,139 @@
 | 
				
			|||||||
/*
 | 
					/* 2024 12 16 Name:"生产领料父组件" */
 | 
				
			||||||
2024 12 16
 | 
					 | 
				
			||||||
Name:"生产领料父组件"
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-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>
 | 
				
			||||||
      <el-form-item label="领料单名称" prop="issueName">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="仓库名称" prop="warehouseName">
 | 
					      <el-form-item label="仓库名称" prop="warehouseName">
 | 
				
			||||||
        <el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable
 | 
					        <el-input
 | 
				
			||||||
          @keyup.enter.native="handleQuery" />
 | 
					          v-model="queryParams.warehouseName"
 | 
				
			||||||
 | 
					          placeholder="请输入仓库名称"
 | 
				
			||||||
 | 
					          clearable
 | 
				
			||||||
 | 
					          @keyup.enter.native="handleQuery"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <el-form-item label="领料日期" prop="issueDate">
 | 
					      <el-form-item label="领料日期" prop="issueDate">
 | 
				
			||||||
        <el-date-picker clearable v-model="queryParams.issueDate" type="date" value-format="yyyy-MM-dd"
 | 
					        <el-date-picker
 | 
				
			||||||
          placeholder="请选择领料日期">
 | 
					          v-model="dateRange"
 | 
				
			||||||
        </el-date-picker>
 | 
					          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-form-item label="单据状态" prop="status">
 | 
					      <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
        <el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
 | 
					        <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"
 | 
					          <el-option
 | 
				
			||||||
            :value="dict.value" />
 | 
					            v-for="dict in dict.type.mes_order_status"
 | 
				
			||||||
 | 
					            :key="dict.value"
 | 
				
			||||||
 | 
					            :label="dict.label"
 | 
				
			||||||
 | 
					            :value="dict.value"
 | 
				
			||||||
 | 
					          />
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:issueheader:add']">新增</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:issueheader:edit']">修改</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:issueheader:remove']">删除</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:issueheader:export']">导出</el-button>
 | 
					          type="warning"
 | 
				
			||||||
 | 
					          plain
 | 
				
			||||||
 | 
					          icon="el-icon-download"
 | 
				
			||||||
 | 
					          size="mini"
 | 
				
			||||||
 | 
					          @click="handleExport"
 | 
				
			||||||
 | 
					          v-hasPermi="['mes:wm:issueheader:export']"
 | 
				
			||||||
 | 
					          >导出</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="领料单编号" align="center" width="150px" prop="issueCode">
 | 
					      <el-table-column label="领料单编号" align="center" width="150px" prop="issueCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:issueheader:query']">{{
 | 
					          <el-button
 | 
				
			||||||
            scope.row.issueCode }}</el-button>
 | 
					            type="text"
 | 
				
			||||||
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
 | 
					            v-hasPermi="['mes:wm:issueheader:query']"
 | 
				
			||||||
 | 
					            >{{ scope.row.issueCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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="workorderCode" />
 | 
				
			||||||
      <el-table-column label="客户编号" align="center" prop="clientCode" />
 | 
					      <el-table-column label="客户编号" align="center" prop="clientCode" />
 | 
				
			||||||
      <el-table-column label="客户名称" align="center" prop="clientName" />
 | 
					      <el-table-column label="客户名称" align="center" prop="clientName" />
 | 
				
			||||||
@@ -76,24 +149,64 @@ Name:"生产领料父组件"
 | 
				
			|||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
					      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleExecute(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">执行领出</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">修改</el-button>
 | 
					            icon="el-icon-video-play"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE'"
 | 
				
			||||||
            @click="handleDelete(scope.row)" v-hasPermi="['mes:wm:issueheader:remove']">删除</el-button>
 | 
					            @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'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">撤销</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:issueheader:edit']">查看撤销原因</el-button>
 | 
					            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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
					    <pagination
 | 
				
			||||||
      @pagination="getList" />
 | 
					      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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
 | 
				
			||||||
@@ -106,8 +219,13 @@ Name:"生产领料父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                active-text="自动生成"
 | 
				
			||||||
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view' && form.status == 'PREPARE'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -120,23 +238,36 @@ Name:"生产领料父组件"
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="领料日期" prop="issueDate">
 | 
					            <el-form-item label="领料日期" prop="issueDate">
 | 
				
			||||||
              <el-date-picker clearable v-model="form.issueDate" type="date" value-format="yyyy-MM-dd"
 | 
					              <el-date-picker
 | 
				
			||||||
                placeholder="请选择领料日期">
 | 
					                clearable
 | 
				
			||||||
 | 
					                v-model="form.issueDate"
 | 
				
			||||||
 | 
					                type="date"
 | 
				
			||||||
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                placeholder="请选择领料日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="领料仓库">
 | 
					            <el-form-item label="领料仓库">
 | 
				
			||||||
              <el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
 | 
					              <el-cascader
 | 
				
			||||||
                @change="handleWarehouseChanged">
 | 
					                v-model="warehouseInfo"
 | 
				
			||||||
 | 
					                :options="warehouseOptions"
 | 
				
			||||||
 | 
					                :props="warehouseProps"
 | 
				
			||||||
 | 
					                @change="handleWarehouseChanged"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-cascader>
 | 
					              </el-cascader>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="单据状态" prop="status">
 | 
					            <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
              <el-select v-model="form.status" disabled>
 | 
					              <el-select v-model="form.status" disabled>
 | 
				
			||||||
                <el-option v-for="dict in dict.type.mes_order_status" :key="dict.value" :label="dict.label"
 | 
					                <el-option
 | 
				
			||||||
                  :value="dict.value"></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-select>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -145,10 +276,17 @@ Name:"生产领料父组件"
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="生产工单" prop="workorderCode">
 | 
					            <el-form-item label="生产工单" prop="workorderCode">
 | 
				
			||||||
              <el-input v-model="form.workorderCode" placeholder="请选择生产工单">
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
 | 
					            <WorkorderSelect
 | 
				
			||||||
 | 
					              ref="woSelect"
 | 
				
			||||||
 | 
					              @onSelected="onWorkorderSelected"
 | 
				
			||||||
 | 
					            ></WorkorderSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="客户编号">
 | 
					            <el-form-item label="客户编号">
 | 
				
			||||||
@@ -188,24 +326,50 @@ Name:"生产领料父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </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">
 | 
					      <el-card shadow="always" v-if="form.issueId != null" class="box-card">
 | 
				
			||||||
        <Issueline ref="line" :issueId="form.issueId" :warehouseId="form.warehouseId" :locationId="form.locationId"
 | 
					        <Issueline
 | 
				
			||||||
          :areaId="form.areaId" :optType="optType"></Issueline>
 | 
					          ref="line"
 | 
				
			||||||
 | 
					          :issueId="form.issueId"
 | 
				
			||||||
 | 
					          :warehouseId="form.warehouseId"
 | 
				
			||||||
 | 
					          :locationId="form.locationId"
 | 
				
			||||||
 | 
					          :areaId="form.areaId"
 | 
				
			||||||
 | 
					          :optType="optType"
 | 
				
			||||||
 | 
					        ></Issueline>
 | 
				
			||||||
      </el-card>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">确
 | 
					          type="primary"
 | 
				
			||||||
          定</el-button>
 | 
					          @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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八 单据撤销 对话框 -->
 | 
					    <!-- 需求八 单据撤销 对话框 -->
 | 
				
			||||||
    <el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
 | 
					    <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-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-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <span slot="footer" class="dialog-footer">
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
@@ -234,7 +398,7 @@ import {
 | 
				
			|||||||
  addIssueheader,
 | 
					  addIssueheader,
 | 
				
			||||||
  updateIssueheader,
 | 
					  updateIssueheader,
 | 
				
			||||||
  execute,
 | 
					  execute,
 | 
				
			||||||
  cancelFn
 | 
					  cancelFn,
 | 
				
			||||||
} from "@/api/mes/wm/issueheader";
 | 
					} from "@/api/mes/wm/issueheader";
 | 
				
			||||||
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
 | 
					import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
 | 
				
			||||||
// 2024 12 19 需求五 标记点
 | 
					// 2024 12 19 需求五 标记点
 | 
				
			||||||
@@ -299,41 +463,34 @@ export default {
 | 
				
			|||||||
        issueDate: null,
 | 
					        issueDate: null,
 | 
				
			||||||
        status: null,
 | 
					        status: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        issueCode: [
 | 
					        issueCode: [{ required: true, message: "领料单编号不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "领料单编号不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        // issueName: [
 | 
					        // issueName: [
 | 
				
			||||||
        //   { required: true, message: "领料单名称不能为空", trigger: "blur" }
 | 
					        //   { required: true, message: "领料单名称不能为空", trigger: "blur" }
 | 
				
			||||||
        // ],
 | 
					        // ],
 | 
				
			||||||
        issueDate: [
 | 
					        issueDate: [{ required: true, message: "请指定领出日期", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "请指定领出日期", trigger: "blur" },
 | 
					        workorderCode: [{ required: true, message: "请指定生产工单", trigger: "blur" }],
 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        workorderCode: [
 | 
					 | 
				
			||||||
          { required: true, message: "请指定生产工单", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 单据撤销 对话框 开关
 | 
					      // 单据撤销 对话框 开关
 | 
				
			||||||
      WithdrawnFlag: false,
 | 
					      WithdrawnFlag: false,
 | 
				
			||||||
      // 单据撤销 对话框 表单参数
 | 
					      // 单据撤销 对话框 表单参数
 | 
				
			||||||
      WithdrawnForm: {
 | 
					      WithdrawnForm: {
 | 
				
			||||||
        issueId: null,
 | 
					        issueId: null,
 | 
				
			||||||
        cancelRemark: null
 | 
					        cancelRemark: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 撤销单 表单校验
 | 
					      // 撤销单 表单校验
 | 
				
			||||||
      WithdrawnRules: {
 | 
					      WithdrawnRules: {
 | 
				
			||||||
        cancelRemark: [
 | 
					        cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "撤销原因不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 查看撤销原因 以及 开关
 | 
					      // 查看撤销原因 以及 开关
 | 
				
			||||||
      LookWithdrawnFlag: false,
 | 
					      LookWithdrawnFlag: false,
 | 
				
			||||||
      LookWithdrawn: null,
 | 
					      LookWithdrawn: null,
 | 
				
			||||||
      // 监听 路由 参数 的 变量
 | 
					      // 监听 路由 参数 的 变量
 | 
				
			||||||
      parameterValue: ''
 | 
					      parameterValue: "",
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -346,11 +503,13 @@ export default {
 | 
				
			|||||||
    /** 查询生产领料单头列表 */
 | 
					    /** 查询生产领料单头列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listIssueheader(this.queryParams).then((response) => {
 | 
					      listIssueheader(this.addDateRange(this.queryParams, this.dateRange)).then(
 | 
				
			||||||
 | 
					        (response) => {
 | 
				
			||||||
          this.issueheaderList = response.rows;
 | 
					          this.issueheaderList = response.rows;
 | 
				
			||||||
          this.total = response.total;
 | 
					          this.total = response.total;
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
      });
 | 
					        }
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getWarehouseList() {
 | 
					    getWarehouseList() {
 | 
				
			||||||
      getTreeList().then((response) => {
 | 
					      getTreeList().then((response) => {
 | 
				
			||||||
@@ -433,10 +592,11 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      if (this.parameterValue) {
 | 
					      if (this.parameterValue) {
 | 
				
			||||||
        this.parameterValue = null;
 | 
					        this.parameterValue = null;
 | 
				
			||||||
        this.resetForm("queryForm");
 | 
					        this.resetForm("queryForm");
 | 
				
			||||||
        this.$router.push('/mes/wm/issue')
 | 
					        this.$router.push("/mes/wm/issue");
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        this.resetForm("queryForm");
 | 
					        this.resetForm("queryForm");
 | 
				
			||||||
        this.handleQuery();
 | 
					        this.handleQuery();
 | 
				
			||||||
@@ -602,9 +762,10 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 撤销原因 提交
 | 
					    // 撤销原因 提交
 | 
				
			||||||
    handleWithdrawnSubmit(formName) {
 | 
					    handleWithdrawnSubmit(formName) {
 | 
				
			||||||
      this.$refs['WithdrawnForm'].validate((valid) => {
 | 
					      this.$refs["WithdrawnForm"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          cancelFn(this.WithdrawnForm).then((res) => {
 | 
					          cancelFn(this.WithdrawnForm)
 | 
				
			||||||
 | 
					            .then((res) => {
 | 
				
			||||||
              console.log(res);
 | 
					              console.log(res);
 | 
				
			||||||
              if (res.code == 200) {
 | 
					              if (res.code == 200) {
 | 
				
			||||||
                this.$modal.msgSuccess(res.msg);
 | 
					                this.$modal.msgSuccess(res.msg);
 | 
				
			||||||
@@ -644,13 +805,14 @@ export default {
 | 
				
			|||||||
                //   });
 | 
					                //   });
 | 
				
			||||||
                // });
 | 
					                // });
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
          }).finally(() => {
 | 
					            })
 | 
				
			||||||
 | 
					            .finally(() => {
 | 
				
			||||||
              this.WithdrawnFlag = false;
 | 
					              this.WithdrawnFlag = false;
 | 
				
			||||||
            this.$refs['WithdrawnForm'].resetFields();
 | 
					              this.$refs["WithdrawnForm"].resetFields();
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          console.log('error submit!!');
 | 
					          console.log("error submit!!");
 | 
				
			||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@@ -669,17 +831,17 @@ export default {
 | 
				
			|||||||
      if (params) {
 | 
					      if (params) {
 | 
				
			||||||
        this.parameterValue = params;
 | 
					        this.parameterValue = params;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    // 监听$route的变化,以便在用户导航到具有不同查询参数的新路由时更新parameterValue
 | 
					    // 监听$route的变化,以便在用户导航到具有不同查询参数的新路由时更新parameterValue
 | 
				
			||||||
    'parameterValue': function (to, from) {
 | 
					    parameterValue: function (to, from) {
 | 
				
			||||||
      console.log(to, from);
 | 
					      console.log(to, from);
 | 
				
			||||||
      this.queryParams.issueCode = to;
 | 
					      this.queryParams.issueCode = to;
 | 
				
			||||||
      setTimeout(() => {
 | 
					      setTimeout(() => {
 | 
				
			||||||
        this.handleQuery();
 | 
					        this.handleQuery();
 | 
				
			||||||
      })
 | 
					      });
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,62 +1,169 @@
 | 
				
			|||||||
/*
 | 
					/* 2024 12 16 Name:"采购入库父组件" */
 | 
				
			||||||
2024 12 16
 | 
					 | 
				
			||||||
Name:"采购入库父组件"
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-form-item label="入库单编号" prop="recptCode">
 | 
				
			||||||
        <el-input v-model="queryParams.recptCode" placeholder="请输入入库单编号" clearable @keyup.enter.native="handleQuery" />
 | 
					        <el-input
 | 
				
			||||||
      </el-form-item>
 | 
					          v-model="queryParams.recptCode"
 | 
				
			||||||
      <el-form-item label="入库单名称" prop="recptName">
 | 
					          placeholder="请输入入库单编号"
 | 
				
			||||||
        <el-input v-model="queryParams.recptName" placeholder="请输入入库单名称" clearable @keyup.enter.native="handleQuery" />
 | 
					          clearable
 | 
				
			||||||
 | 
					          @keyup.enter.native="handleQuery"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </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-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>
 | 
				
			||||||
      <el-form-item label="订单编号" prop="poCode">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="入库日期" prop="recptDate">
 | 
					      <el-form-item label="入库日期" prop="recptDate">
 | 
				
			||||||
        <el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
 | 
					        <el-date-picker
 | 
				
			||||||
          range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:itemrecpt:add']">新增</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:itemrecpt:edit']">修改</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:itemrecpt:remove']">删除</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:itemrecpt:export']">导出</el-button>
 | 
					          type="warning"
 | 
				
			||||||
 | 
					          plain
 | 
				
			||||||
 | 
					          icon="el-icon-download"
 | 
				
			||||||
 | 
					          size="mini"
 | 
				
			||||||
 | 
					          @click="handleExport"
 | 
				
			||||||
 | 
					          v-hasPermi="['mes:wm:itemrecpt:export']"
 | 
				
			||||||
 | 
					          >导出</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="入库单编号" align="center" width="180px" prop="recptCode">
 | 
					      <el-table-column label="入库单编号" align="center" width="180px" prop="recptCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:itemrecpt:query']">{{
 | 
					          <el-button
 | 
				
			||||||
            scope.row.recptCode }}</el-button>
 | 
					            type="text"
 | 
				
			||||||
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
 | 
					            v-hasPermi="['mes:wm:itemrecpt:query']"
 | 
				
			||||||
 | 
					            >{{ scope.row.recptCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="入库单名称" align="center" prop="recptName" :show-overflow-tooltip="true" />
 | 
					      <!-- <el-table-column
 | 
				
			||||||
      <el-table-column label="供应商名称" align="center" prop="vendorName" :show-overflow-tooltip="true" />
 | 
					        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">
 | 
					      <el-table-column label="入库日期" align="center" prop="recptDate" width="180">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
 | 
					          <span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
@@ -70,24 +177,64 @@ Name:"采购入库父组件"
 | 
				
			|||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
					      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleExecute(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">执行入库</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">修改</el-button>
 | 
					            icon="el-icon-video-play"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE'"
 | 
				
			||||||
            @click="handleDelete(scope.row)" v-hasPermi="['mes:wm:itemrecpt:remove']">删除</el-button>
 | 
					            @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'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">撤销</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:itemrecpt:edit']">查看撤销原因</el-button>
 | 
					            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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
					    <pagination
 | 
				
			||||||
      @pagination="getList" />
 | 
					      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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
 | 
				
			||||||
@@ -100,8 +247,13 @@ Name:"采购入库父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                active-text="自动生成"
 | 
				
			||||||
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view' && form.status == 'PREPARE'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -114,8 +266,13 @@ Name:"采购入库父组件"
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="入库日期" prop="recptDate">
 | 
					            <el-form-item label="入库日期" prop="recptDate">
 | 
				
			||||||
              <el-date-picker clearable v-model="form.recptDate" type="date" value-format="yyyy-MM-dd"
 | 
					              <el-date-picker
 | 
				
			||||||
                placeholder="请选择入库日期">
 | 
					                clearable
 | 
				
			||||||
 | 
					                v-model="form.recptDate"
 | 
				
			||||||
 | 
					                type="date"
 | 
				
			||||||
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                placeholder="请选择入库日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -127,8 +284,12 @@ Name:"采购入库父组件"
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="单据状态" prop="status">
 | 
					            <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
              <el-select v-model="form.status" disabled placeholder="请选择单据状态">
 | 
					              <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"
 | 
					                <el-option
 | 
				
			||||||
                  :value="dict.value"></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-select>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -136,16 +297,28 @@ Name:"采购入库父组件"
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="供应商" prop="vendorName">
 | 
					            <el-form-item label="供应商" prop="vendorName">
 | 
				
			||||||
              <el-input v-model="form.vendorName" readonly="readonly" placeholder="请选择供应商">
 | 
					              <el-input
 | 
				
			||||||
                <el-button slot="append" @click="handleSelectVendor" icon="el-icon-search"></el-button>
 | 
					                v-model="form.vendorName"
 | 
				
			||||||
 | 
					                readonly="readonly"
 | 
				
			||||||
 | 
					                placeholder="请选择供应商"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-button
 | 
				
			||||||
 | 
					                  slot="append"
 | 
				
			||||||
 | 
					                  @click="handleSelectVendor"
 | 
				
			||||||
 | 
					                  icon="el-icon-search"
 | 
				
			||||||
 | 
					                ></el-button>
 | 
				
			||||||
              </el-input>
 | 
					              </el-input>
 | 
				
			||||||
              <VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
 | 
					              <VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="入库仓库">
 | 
					            <el-form-item label="入库仓库">
 | 
				
			||||||
              <el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
 | 
					              <el-cascader
 | 
				
			||||||
                @change="handleWarehouseChanged">
 | 
					                v-model="warehouseInfo"
 | 
				
			||||||
 | 
					                :options="warehouseOptions"
 | 
				
			||||||
 | 
					                :props="warehouseProps"
 | 
				
			||||||
 | 
					                @change="handleWarehouseChanged"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-cascader>
 | 
					              </el-cascader>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -159,24 +332,50 @@ Name:"采购入库父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </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">
 | 
					      <el-card shadow="always" v-if="form.recptId != null" class="box-card">
 | 
				
			||||||
        <Itemrecptline ref="line" :recptId="form.recptId" :warehouseId="form.warehouseId" :locationId="form.locationId"
 | 
					        <Itemrecptline
 | 
				
			||||||
          :areaId="form.areaId" :optType="optType"></Itemrecptline>
 | 
					          ref="line"
 | 
				
			||||||
 | 
					          :recptId="form.recptId"
 | 
				
			||||||
 | 
					          :warehouseId="form.warehouseId"
 | 
				
			||||||
 | 
					          :locationId="form.locationId"
 | 
				
			||||||
 | 
					          :areaId="form.areaId"
 | 
				
			||||||
 | 
					          :optType="optType"
 | 
				
			||||||
 | 
					        ></Itemrecptline>
 | 
				
			||||||
      </el-card>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
 | 
					          type="primary"
 | 
				
			||||||
          存</el-button>
 | 
					          @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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八 单据撤销 对话框 -->
 | 
					    <!-- 需求八 单据撤销 对话框 -->
 | 
				
			||||||
    <el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
 | 
					    <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-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-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <span slot="footer" class="dialog-footer">
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
@@ -201,16 +400,20 @@ Name:"采购入库父组件"
 | 
				
			|||||||
        <p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
 | 
					        <p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
 | 
				
			||||||
        <p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
 | 
					        <p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
 | 
				
			||||||
          <span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
 | 
					          <span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
 | 
				
			||||||
          <router-link :to="{
 | 
					          <router-link
 | 
				
			||||||
 | 
					            :to="{
 | 
				
			||||||
              path: WithdrawnErrorObjMap[name].path,
 | 
					              path: WithdrawnErrorObjMap[name].path,
 | 
				
			||||||
              query: { Parameters: item },
 | 
					              query: { Parameters: item },
 | 
				
			||||||
          }" v-for="(item, ind) in value" :key="ind">
 | 
					            }"
 | 
				
			||||||
            <span style="
 | 
					            v-for="(item, ind) in value"
 | 
				
			||||||
                color: #02a7f1;
 | 
					            :key="ind"
 | 
				
			||||||
                border-bottom: 1px solid #02a7f1;
 | 
					          >
 | 
				
			||||||
                margin-right: 8px;
 | 
					            <span
 | 
				
			||||||
              " :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'" @click="WithdrawnErrorFlag = false">{{ item
 | 
					              style="color: #02a7f1; border-bottom: 1px solid #02a7f1; margin-right: 8px"
 | 
				
			||||||
              }}</span>
 | 
					              :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'"
 | 
				
			||||||
 | 
					              @click="WithdrawnErrorFlag = false"
 | 
				
			||||||
 | 
					              >{{ item }}</span
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
          </router-link>
 | 
					          </router-link>
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
        <p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
 | 
					        <p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
 | 
				
			||||||
@@ -293,25 +496,20 @@ export default {
 | 
				
			|||||||
        recptDate: null,
 | 
					        recptDate: null,
 | 
				
			||||||
        poCode: null,
 | 
					        poCode: null,
 | 
				
			||||||
        status: null,
 | 
					        status: null,
 | 
				
			||||||
 | 
					        itemCode: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      dateRange: [],
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        recptCode: [
 | 
					        recptCode: [{ required: true, message: "入库单编号不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "入库单编号不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        // 2024 12 16 需求三 入库单据名称改为非必填
 | 
					        // 2024 12 16 需求三 入库单据名称改为非必填
 | 
				
			||||||
        // recptName: [
 | 
					        // recptName: [
 | 
				
			||||||
        //   { required: true, message: "入库单名称不能为空", trigger: "blur" }
 | 
					        //   { required: true, message: "入库单名称不能为空", trigger: "blur" }
 | 
				
			||||||
        // ],
 | 
					        // ],
 | 
				
			||||||
        recptDate: [
 | 
					        recptDate: [{ required: true, message: "入库时间不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "入库时间不能为空", trigger: "blur" },
 | 
					        vendorName: [{ required: true, message: "请选择对应的供应商", trigger: "blur" }],
 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        vendorName: [
 | 
					 | 
				
			||||||
          { required: true, message: "请选择对应的供应商", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 单据撤销 对话框 开关
 | 
					      // 单据撤销 对话框 开关
 | 
				
			||||||
      WithdrawnFlag: false,
 | 
					      WithdrawnFlag: false,
 | 
				
			||||||
@@ -322,9 +520,7 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      // 撤销单 表单校验
 | 
					      // 撤销单 表单校验
 | 
				
			||||||
      WithdrawnRules: {
 | 
					      WithdrawnRules: {
 | 
				
			||||||
        cancelRemark: [
 | 
					        cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "撤销原因不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 查看撤销原因 以及 开关
 | 
					      // 查看撤销原因 以及 开关
 | 
				
			||||||
      LookWithdrawnFlag: false,
 | 
					      LookWithdrawnFlag: false,
 | 
				
			||||||
@@ -524,9 +720,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    doconfirm() {
 | 
					    doconfirm() {
 | 
				
			||||||
      let that = this;
 | 
					      let that = this;
 | 
				
			||||||
      this.$modal
 | 
					      this.$modal.confirm("是否完成入库单编制?【完成后将不能更改】").then(function () {
 | 
				
			||||||
        .confirm("是否完成入库单编制?【完成后将不能更改】")
 | 
					 | 
				
			||||||
        .then(function () {
 | 
					 | 
				
			||||||
        that.form.status = "CONFIRMED";
 | 
					        that.form.status = "CONFIRMED";
 | 
				
			||||||
        that.submitForm();
 | 
					        that.submitForm();
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,5 @@
 | 
				
			|||||||
/*
 | 
					/* 2024 12 16 新增props:"upFlag",用于更新父组件表单数据
 | 
				
			||||||
  2024 12 16 
 | 
					新增props:"warehouseInfo",用于获取仓库信息 */
 | 
				
			||||||
  新增props:"upFlag",用于更新父组件表单数据
 | 
					 | 
				
			||||||
  新增props:"warehouseInfo",用于获取仓库信息
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <div class="app-container">
 | 
				
			||||||
    <el-row v-if="optType != 'view'" :gutter="10" class="mb8">
 | 
					    <el-row v-if="optType != 'view'" :gutter="10" class="mb8">
 | 
				
			||||||
@@ -55,10 +52,7 @@
 | 
				
			|||||||
          >导入</el-button
 | 
					          >导入</el-button
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
        :showSearch.sync="showSearch"
 | 
					 | 
				
			||||||
        @queryTable="getList"
 | 
					 | 
				
			||||||
      ></right-toolbar>
 | 
					 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-table
 | 
					    <el-table
 | 
				
			||||||
@@ -66,12 +60,7 @@
 | 
				
			|||||||
      :data="productrecptlineList"
 | 
					      :data="productrecptlineList"
 | 
				
			||||||
      @selection-change="handleSelectionChange"
 | 
					      @selection-change="handleSelectionChange"
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
      <el-table-column
 | 
					      <el-table-column type="selection" width="55" align="center" fixed="left" />
 | 
				
			||||||
        type="selection"
 | 
					 | 
				
			||||||
        width="55"
 | 
					 | 
				
			||||||
        align="center"
 | 
					 | 
				
			||||||
        fixed="left"
 | 
					 | 
				
			||||||
      />
 | 
					 | 
				
			||||||
      <el-table-column
 | 
					      <el-table-column
 | 
				
			||||||
        label="产品物料编码"
 | 
					        label="产品物料编码"
 | 
				
			||||||
        width="120px"
 | 
					        width="120px"
 | 
				
			||||||
@@ -141,11 +130,15 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="产品物料编码" prop="itemCode">
 | 
					            <el-form-item label="产品物料编码" prop="itemCode">
 | 
				
			||||||
              <el-input
 | 
					              <el-input v-model="form.itemCode" placeholder="请输入产品物料编码" readonly>
 | 
				
			||||||
                v-model="form.itemCode"
 | 
					                <el-button
 | 
				
			||||||
                placeholder="请输入产品物料编码"
 | 
					                  slot="append"
 | 
				
			||||||
                readonly
 | 
					                  @click="handleSelectProduct"
 | 
				
			||||||
              />
 | 
					                  icon="el-icon-search"
 | 
				
			||||||
 | 
					                  v-if="title === '添加产品入库记录行'"
 | 
				
			||||||
 | 
					                ></el-button>
 | 
				
			||||||
 | 
					              </el-input>
 | 
				
			||||||
 | 
					              <ItemSelect ref="itemSelect" @onSelected="onItemSelected"> </ItemSelect>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
@@ -159,22 +152,14 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="单位" prop="unitOfMeasure">
 | 
					            <el-form-item label="单位" prop="unitOfMeasure">
 | 
				
			||||||
              <el-input
 | 
					              <el-input v-model="form.unitOfMeasure" placeholder="请输入单位" readonly />
 | 
				
			||||||
                v-model="form.unitOfMeasure"
 | 
					 | 
				
			||||||
                placeholder="请输入单位"
 | 
					 | 
				
			||||||
                readonly
 | 
					 | 
				
			||||||
              />
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="规格型号" prop="specification">
 | 
					            <el-form-item label="规格型号" prop="specification">
 | 
				
			||||||
              <el-input
 | 
					              <el-input v-model="form.specification" placeholder="请输入内容" readonly />
 | 
				
			||||||
                v-model="form.specification"
 | 
					 | 
				
			||||||
                placeholder="请输入内容"
 | 
					 | 
				
			||||||
                readonly
 | 
					 | 
				
			||||||
              />
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
@@ -209,11 +194,7 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="备注" prop="remark">
 | 
					            <el-form-item label="备注" prop="remark">
 | 
				
			||||||
              <el-input
 | 
					              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
 | 
				
			||||||
                v-model="form.remark"
 | 
					 | 
				
			||||||
                type="textarea"
 | 
					 | 
				
			||||||
                placeholder="请输入内容"
 | 
					 | 
				
			||||||
              />
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -251,10 +232,7 @@
 | 
				
			|||||||
        </el-upload>
 | 
					        </el-upload>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button
 | 
					        <el-button type="primary" @click="submitXlsx" :disabled="!(ProAllArr.length > 0)"
 | 
				
			||||||
          type="primary"
 | 
					 | 
				
			||||||
          @click="submitXlsx"
 | 
					 | 
				
			||||||
          :disabled="!(ProAllArr.length > 0)"
 | 
					 | 
				
			||||||
          >确 定</el-button
 | 
					          >确 定</el-button
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
        <el-button @click="cancelXlsx">取 消</el-button>
 | 
					        <el-button @click="cancelXlsx">取 消</el-button>
 | 
				
			||||||
@@ -273,6 +251,7 @@ import {
 | 
				
			|||||||
} from "@/api/mes/wm/productrecptline";
 | 
					} from "@/api/mes/wm/productrecptline";
 | 
				
			||||||
import StockSelect from "@/components/stockSelect/single.vue";
 | 
					import StockSelect from "@/components/stockSelect/single.vue";
 | 
				
			||||||
import { getTreeList } from "@/api/mes/wm/warehouse";
 | 
					import { getTreeList } from "@/api/mes/wm/warehouse";
 | 
				
			||||||
 | 
					import ItemSelect  from "@/components/itemSelect/single.vue";
 | 
				
			||||||
// 引入xlsx
 | 
					// 引入xlsx
 | 
				
			||||||
import * as XLSX from "xlsx";
 | 
					import * as XLSX from "xlsx";
 | 
				
			||||||
// 引入lodash
 | 
					// 引入lodash
 | 
				
			||||||
@@ -284,6 +263,7 @@ export default {
 | 
				
			|||||||
  name: "Productrecptline",
 | 
					  name: "Productrecptline",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    StockSelect,
 | 
					    StockSelect,
 | 
				
			||||||
 | 
					    ItemSelect
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    recptId: null,
 | 
					    recptId: null,
 | 
				
			||||||
@@ -358,9 +338,7 @@ export default {
 | 
				
			|||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        itemId: [{ required: true, message: "产品不能为空", trigger: "blur" }],
 | 
					        itemId: [{ required: true, message: "产品不能为空", trigger: "blur" }],
 | 
				
			||||||
        warehouseId: [
 | 
					        warehouseId: [{ required: true, message: "入库仓库不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "入库仓库不能为空", trigger: "blur" },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        quantityRecived: [
 | 
					        quantityRecived: [
 | 
				
			||||||
          { required: true, message: "入库数量不能为空", trigger: "blur" },
 | 
					          { required: true, message: "入库数量不能为空", trigger: "blur" },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
@@ -666,6 +644,20 @@ export default {
 | 
				
			|||||||
        this.form.areaId = obj[2];
 | 
					        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() {
 | 
					  beforeUpdate() {
 | 
				
			||||||
    console.log(
 | 
					    console.log(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +1,21 @@
 | 
				
			|||||||
/* 2024 12 16 Name:"销售出库父组件" */
 | 
					/* 2024 12 16 Name:"销售出库父组件" */
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-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>
 | 
					      </el-form-item>
 | 
				
			||||||
      <!-- 2024 12 19 需求五 仅注释html,js部分不动,以便随时恢复 -->
 | 
					      <!-- 2024 12 19 需求五 仅注释html,js部分不动,以便随时恢复 -->
 | 
				
			||||||
      <!-- <el-form-item label="销售订单编号" prop="soCode">
 | 
					      <!-- <el-form-item label="销售订单编号" prop="soCode">
 | 
				
			||||||
@@ -15,51 +27,106 @@
 | 
				
			|||||||
        />
 | 
					        />
 | 
				
			||||||
      </el-form-item> -->
 | 
					      </el-form-item> -->
 | 
				
			||||||
      <el-form-item label="客户名称" prop="clientName">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="出库日期" prop="salseDate">
 | 
					      <el-form-item label="出库日期" prop="salseDate">
 | 
				
			||||||
        <el-date-picker clearable v-model="queryParams.salseDate" type="date" value-format="yyyy-MM-dd"
 | 
					        <el-date-picker
 | 
				
			||||||
          placeholder="请选择出库日期">
 | 
					          v-model="dateRange"
 | 
				
			||||||
        </el-date-picker>
 | 
					          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-form-item label="单据状态" prop="status">
 | 
					      <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
        <el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
 | 
					        <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"
 | 
					          <el-option
 | 
				
			||||||
            :value="dict.value" />
 | 
					            v-for="dict in dict.type.mes_order_status"
 | 
				
			||||||
 | 
					            :key="dict.value"
 | 
				
			||||||
 | 
					            :label="dict.label"
 | 
				
			||||||
 | 
					            :value="dict.value"
 | 
				
			||||||
 | 
					          />
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:productsalse:add']">新增</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:productsalse:edit']">修改</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:productsalse:remove']">删除</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:productsalse:export']">导出</el-button>
 | 
					          type="warning"
 | 
				
			||||||
 | 
					          plain
 | 
				
			||||||
 | 
					          icon="el-icon-download"
 | 
				
			||||||
 | 
					          size="mini"
 | 
				
			||||||
 | 
					          @click="handleExport"
 | 
				
			||||||
 | 
					          v-hasPermi="['mes:wm:productsalse:export']"
 | 
				
			||||||
 | 
					          >导出</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="出库单编号" width="150px" align="center" prop="salseCode">
 | 
					      <el-table-column label="出库单编号" width="150px" align="center" prop="salseCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:productsalse:query']">{{
 | 
					          <el-button
 | 
				
			||||||
            scope.row.salseCode }}</el-button>
 | 
					            type="text"
 | 
				
			||||||
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
 | 
					            v-hasPermi="['mes:wm:productsalse:query']"
 | 
				
			||||||
 | 
					            >{{ scope.row.salseCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="出库单名称" width="150px" align="center" prop="salseName" />
 | 
					      <el-table-column label="出库单名称" width="150px" align="center" prop="salseName" />
 | 
				
			||||||
@@ -70,6 +137,8 @@
 | 
				
			|||||||
        align="center"
 | 
					        align="center"
 | 
				
			||||||
        prop="soCode"
 | 
					        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="clientCode" />
 | 
				
			||||||
      <el-table-column label="客户名称" align="center" prop="clientName" />
 | 
					      <el-table-column label="客户名称" align="center" prop="clientName" />
 | 
				
			||||||
      <el-table-column label="合计重量" align="center" prop="sumQuantity">
 | 
					      <el-table-column label="合计重量" align="center" prop="sumQuantity">
 | 
				
			||||||
@@ -87,26 +156,71 @@
 | 
				
			|||||||
          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
					          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
 | 
					          <el-button
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:productsalse:edit']">修改</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
 | 
					            type="text"
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:productsalse:remove']">删除</el-button>
 | 
					            icon="el-icon-edit"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-video-play" @click="handleExecute(scope.row)"
 | 
					            @click="handleUpdate(scope.row)"
 | 
				
			||||||
            v-if="scope.row.status == 'CONFIRMED'" v-hasPermi="['mes:wm:productsalse:edit']">执行出库</el-button>
 | 
					            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'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:productsalse:edit']">撤销</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:productsalse:edit']">查看撤销原因</el-button>
 | 
					            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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
					    <pagination
 | 
				
			||||||
      @pagination="getList" />
 | 
					      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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
 | 
				
			||||||
@@ -119,8 +233,13 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                active-text="自动生成"
 | 
				
			||||||
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view' && form.status == 'PREPARE'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -134,25 +253,51 @@
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="是否需要销售订单编号" prop="" label-width="170px">
 | 
					            <el-form-item label="是否需要销售订单编号" prop="" label-width="170px">
 | 
				
			||||||
              <el-switch v-model="needSoCodeFlag" active-color="#13ce66" inactive-color="#DCDFE6"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleChangeNeedSoCodeFlag">
 | 
					                v-model="needSoCodeFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                inactive-color="#DCDFE6"
 | 
				
			||||||
 | 
					                @change="handleChangeNeedSoCodeFlag"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="9">
 | 
					          <el-col :span="9">
 | 
				
			||||||
            <el-form-item label="销售订单编号" prop="soCode" label-width="120px" v-show="needSoCodeFlag">
 | 
					            <el-form-item
 | 
				
			||||||
              <el-input v-model="form.soCode" placeholder="请输入销售订单编号" style="width: 200px">
 | 
					              label="销售订单编号"
 | 
				
			||||||
                <el-button slot="append" icon="el-icon-search" @click="handleSelectOrdet"></el-button>
 | 
					              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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="客户编码" prop="clientCode">
 | 
					            <el-form-item label="客户编码" prop="clientCode">
 | 
				
			||||||
              <el-input v-model="form.clientCode" placeholder="请输入客户编码" readonly="readonly" :disabled="needSoCodeFlag">
 | 
					              <el-input
 | 
				
			||||||
                <el-button slot="append" @click="handleSelectClient" icon="el-icon-search"
 | 
					                v-model="form.clientCode"
 | 
				
			||||||
                  :disabled="needSoCodeFlag"></el-button>
 | 
					                placeholder="请输入客户编码"
 | 
				
			||||||
 | 
					                readonly="readonly"
 | 
				
			||||||
 | 
					                :disabled="needSoCodeFlag"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-button
 | 
				
			||||||
 | 
					                  slot="append"
 | 
				
			||||||
 | 
					                  @click="handleSelectClient"
 | 
				
			||||||
 | 
					                  icon="el-icon-search"
 | 
				
			||||||
 | 
					                  :disabled="needSoCodeFlag"
 | 
				
			||||||
 | 
					                ></el-button>
 | 
				
			||||||
              </el-input>
 | 
					              </el-input>
 | 
				
			||||||
              <ClientSelect ref="clientSelect" @onSelected="onClientSelected">
 | 
					              <ClientSelect ref="clientSelect" @onSelected="onClientSelected">
 | 
				
			||||||
              </ClientSelect>
 | 
					              </ClientSelect>
 | 
				
			||||||
@@ -160,23 +305,36 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="7">
 | 
					          <el-col :span="7">
 | 
				
			||||||
            <el-form-item label="客户名称" prop="clientName">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="出库日期" prop="salseDate">
 | 
					            <el-form-item label="出库日期" prop="salseDate">
 | 
				
			||||||
              <el-date-picker clearable v-model="form.salseDate" type="date" value-format="yyyy-MM-dd"
 | 
					              <el-date-picker
 | 
				
			||||||
                placeholder="请选择出库日期">
 | 
					                clearable
 | 
				
			||||||
 | 
					                v-model="form.salseDate"
 | 
				
			||||||
 | 
					                type="date"
 | 
				
			||||||
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                placeholder="请选择出库日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="单据状态" prop="status">
 | 
					            <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
              <el-select v-model="form.status" disabled placeholder="请选择单据状态">
 | 
					              <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"
 | 
					                <el-option
 | 
				
			||||||
                  :value="dict.value"></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-select>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -188,6 +346,25 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <!--  -->
 | 
					          <!--  -->
 | 
				
			||||||
        </el-row>
 | 
					        </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-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="备注" prop="remark">
 | 
					            <el-form-item label="备注" prop="remark">
 | 
				
			||||||
@@ -196,27 +373,58 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </el-form>
 | 
					      </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">
 | 
					      <el-card shadow="always" v-if="form.salseId != null" class="box-card">
 | 
				
			||||||
        <Productsalseline ref="line" :salseId="form.salseId" :warehouseId="form.warehouseId"
 | 
					        <Productsalseline
 | 
				
			||||||
          :locationId="form.locationId" :areaId="form.areaId" :optType="optType" :upFlag="upFlag"
 | 
					          ref="line"
 | 
				
			||||||
          @changeUpFlag="changeUpFlag"></Productsalseline>
 | 
					          :salseId="form.salseId"
 | 
				
			||||||
 | 
					          :warehouseId="form.warehouseId"
 | 
				
			||||||
 | 
					          :locationId="form.locationId"
 | 
				
			||||||
 | 
					          :areaId="form.areaId"
 | 
				
			||||||
 | 
					          :optType="optType"
 | 
				
			||||||
 | 
					          :upFlag="upFlag"
 | 
				
			||||||
 | 
					          @changeUpFlag="changeUpFlag"
 | 
				
			||||||
 | 
					        ></Productsalseline>
 | 
				
			||||||
      </el-card>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
 | 
					          type="primary"
 | 
				
			||||||
          存</el-button>
 | 
					          @click="cancel"
 | 
				
			||||||
        <el-button type="success" @click="handleConfirm"
 | 
					          v-if="optType == 'view' || form.status != 'PREPARE'"
 | 
				
			||||||
          v-if="form.status == 'PREPARE' && optType != 'view' && form.salseId != null">确 认</el-button>
 | 
					          >返回</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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八 单据撤销 对话框 -->
 | 
					    <!-- 需求八 单据撤销 对话框 -->
 | 
				
			||||||
    <el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
 | 
					    <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-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-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <span slot="footer" class="dialog-footer">
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
@@ -317,6 +525,7 @@ export default {
 | 
				
			|||||||
        salseDate: null,
 | 
					        salseDate: null,
 | 
				
			||||||
        status: null,
 | 
					        status: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
@@ -360,7 +569,6 @@ export default {
 | 
				
			|||||||
      this.form.soCode = null;
 | 
					      this.form.soCode = null;
 | 
				
			||||||
      this.form.clientCode = null;
 | 
					      this.form.clientCode = null;
 | 
				
			||||||
      this.form.clientName = null;
 | 
					      this.form.clientName = null;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 2024 12 16 需求二 供子组件使用 更改"upFlag"变量 触发父组件监听
 | 
					    // 2024 12 16 需求二 供子组件使用 更改"upFlag"变量 触发父组件监听
 | 
				
			||||||
    changeUpFlag() {
 | 
					    changeUpFlag() {
 | 
				
			||||||
@@ -369,11 +577,13 @@ export default {
 | 
				
			|||||||
    /** 查询销售出库单列表 */
 | 
					    /** 查询销售出库单列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listProductsalse(this.queryParams).then((response) => {
 | 
					      listProductsalse(this.addDateRange(this.queryParams, this.dateRange)).then(
 | 
				
			||||||
 | 
					        (response) => {
 | 
				
			||||||
          this.productsalseList = response.rows;
 | 
					          this.productsalseList = response.rows;
 | 
				
			||||||
          this.total = response.total;
 | 
					          this.total = response.total;
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
      });
 | 
					        }
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //获取仓库信息
 | 
					    //获取仓库信息
 | 
				
			||||||
    getWarehouseList() {
 | 
					    getWarehouseList() {
 | 
				
			||||||
@@ -457,6 +667,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      if (this.parameterValue) {
 | 
					      if (this.parameterValue) {
 | 
				
			||||||
        this.parameterValue = null;
 | 
					        this.parameterValue = null;
 | 
				
			||||||
        this.resetForm("queryForm");
 | 
					        this.resetForm("queryForm");
 | 
				
			||||||
@@ -474,8 +685,6 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 查询明细按钮操作
 | 
					    // 查询明细按钮操作
 | 
				
			||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      console.log(row);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const salseId = row.salseId;
 | 
					      const salseId = row.salseId;
 | 
				
			||||||
      localStorage.setItem("productsalse-handleUpdate-salseId", JSON.stringify(salseId));
 | 
					      localStorage.setItem("productsalse-handleUpdate-salseId", JSON.stringify(salseId));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,59 +1,136 @@
 | 
				
			|||||||
/*
 | 
					/* 2024 12 16 Name:"生产退料父组件" */
 | 
				
			||||||
2024 12 16
 | 
					 | 
				
			||||||
Name:"生产退料父组件"
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-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>
 | 
				
			||||||
      <el-form-item label="生产工单" prop="workorderCode">
 | 
					      <el-form-item label="生产工单" prop="workorderCode">
 | 
				
			||||||
        <el-input v-model="queryParams.workorderCode" placeholder="请输入生产工单编号" clearable
 | 
					        <el-input
 | 
				
			||||||
          @keyup.enter.native="handleQuery" />
 | 
					          v-model="queryParams.workorderCode"
 | 
				
			||||||
 | 
					          placeholder="请输入生产工单编号"
 | 
				
			||||||
 | 
					          clearable
 | 
				
			||||||
 | 
					          @keyup.enter.native="handleQuery"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
      <el-form-item label="仓库名称" prop="warehouseName">
 | 
					      <el-form-item label="仓库名称" prop="warehouseName">
 | 
				
			||||||
        <el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable
 | 
					        <el-input
 | 
				
			||||||
          @keyup.enter.native="handleQuery" />
 | 
					          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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtissue:add']">新增</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtissue:edit']">修改</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtissue:remove']">删除</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>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="退料单编号" width="140px" align="center" prop="rtCode">
 | 
					      <el-table-column label="退料单编号" width="140px" align="center" prop="rtCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:rtissue:query']">{{
 | 
					          <el-button
 | 
				
			||||||
            scope.row.rtCode }}</el-button>
 | 
					            type="text"
 | 
				
			||||||
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
 | 
					            v-hasPermi="['mes:wm:rtissue:query']"
 | 
				
			||||||
 | 
					            >{{ scope.row.rtCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="退料单名称" width="120px" align="center" prop="rtName" :show-overflow-tooltip="true" />
 | 
					      <el-table-column
 | 
				
			||||||
      <el-table-column label="生产工单" width="140px" align="center" prop="workorderCode" />
 | 
					        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="仓库名称" 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="areaName" />
 | 
				
			||||||
      <el-table-column label="退料日期" align="center" prop="rtDate" width="120">
 | 
					      <el-table-column label="退料日期" align="center" prop="rtDate" width="120">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.rtDate, '{y}-{m}-{d}') }}</span>
 | 
					          <span>{{ parseTime(scope.row.rtDate, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="单据状态" align="center" prop="status">
 | 
					      <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" />
 | 
					          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleExecute(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">执行退料</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">修改</el-button>
 | 
					            icon="el-icon-video-play"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE'"
 | 
				
			||||||
            @click="handleDelete(scope.row)" v-hasPermi="['mes:wm:rtissue:remove']">删除</el-button>
 | 
					            @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'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">撤销</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtissue:edit']">查看撤销原因</el-button>
 | 
					            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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
					    <pagination
 | 
				
			||||||
      @pagination="getList" />
 | 
					      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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
 | 
				
			||||||
@@ -93,8 +215,13 @@ Name:"生产退料父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                active-text="自动生成"
 | 
				
			||||||
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view' && form.status == 'PREPARE'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -108,22 +235,38 @@ Name:"生产退料父组件"
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="生产工单" prop="workorderCode">
 | 
					            <el-form-item label="生产工单" prop="workorderCode">
 | 
				
			||||||
              <el-input v-model="form.workorderCode" placeholder="请输入生产工单">
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
 | 
					            <WorkorderSelect
 | 
				
			||||||
 | 
					              ref="woSelect"
 | 
				
			||||||
 | 
					              @onSelected="onWorkorderSelected"
 | 
				
			||||||
 | 
					            ></WorkorderSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="接收仓库">
 | 
					            <el-form-item label="接收仓库">
 | 
				
			||||||
              <el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
 | 
					              <el-cascader
 | 
				
			||||||
                @change="handleWarehouseChanged">
 | 
					                v-model="warehouseInfo"
 | 
				
			||||||
 | 
					                :options="warehouseOptions"
 | 
				
			||||||
 | 
					                :props="warehouseProps"
 | 
				
			||||||
 | 
					                @change="handleWarehouseChanged"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-cascader>
 | 
					              </el-cascader>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="退料日期" prop="rtDate">
 | 
					            <el-form-item label="退料日期" prop="rtDate">
 | 
				
			||||||
              <el-date-picker clearable v-model="form.rtDate" type="date" value-format="yyyy-MM-dd"
 | 
					              <el-date-picker
 | 
				
			||||||
                placeholder="请选择退料日期">
 | 
					                clearable
 | 
				
			||||||
 | 
					                v-model="form.rtDate"
 | 
				
			||||||
 | 
					                type="date"
 | 
				
			||||||
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                placeholder="请选择退料日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -158,18 +301,36 @@ Name:"生产退料父组件"
 | 
				
			|||||||
        <Rtissueline :rtId="form.rtId" :optType="optType"></Rtissueline>
 | 
					        <Rtissueline :rtId="form.rtId" :optType="optType"></Rtissueline>
 | 
				
			||||||
      </el-card>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
 | 
					          type="primary"
 | 
				
			||||||
          存</el-button>
 | 
					          @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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八 单据撤销 对话框 -->
 | 
					    <!-- 需求八 单据撤销 对话框 -->
 | 
				
			||||||
    <el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
 | 
					    <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-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-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <span slot="footer" class="dialog-footer">
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
@@ -191,38 +352,51 @@ Name:"生产退料父组件"
 | 
				
			|||||||
    <!-- 撤销错误 对话框 提示 需求八 -->
 | 
					    <!-- 撤销错误 对话框 提示 需求八 -->
 | 
				
			||||||
    <el-dialog title="提示" :visible.sync="WithdrawnErrorFlag" width="45%">
 | 
					    <el-dialog title="提示" :visible.sync="WithdrawnErrorFlag" width="45%">
 | 
				
			||||||
      <div>
 | 
					      <div>
 | 
				
			||||||
        <p style="margin-top: 0px;">当前单据部分产品物料已出库,相关单据:</p>
 | 
					        <p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
 | 
				
			||||||
        <p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
 | 
					        <p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
 | 
				
			||||||
          <span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
 | 
					          <span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
 | 
				
			||||||
          <router-link :to="{
 | 
					          <router-link
 | 
				
			||||||
 | 
					            :to="{
 | 
				
			||||||
              path: WithdrawnErrorObjMap[name].path,
 | 
					              path: WithdrawnErrorObjMap[name].path,
 | 
				
			||||||
              query: { Parameters: item },
 | 
					              query: { Parameters: item },
 | 
				
			||||||
          }" v-for="(item, ind) in value" :key="ind">
 | 
					            }"
 | 
				
			||||||
            <span style="
 | 
					            v-for="(item, ind) in value"
 | 
				
			||||||
                color: #02a7f1;
 | 
					            :key="ind"
 | 
				
			||||||
                border-bottom: 1px solid #02a7f1;
 | 
					          >
 | 
				
			||||||
                margin-right: 8px;
 | 
					            <span
 | 
				
			||||||
              " :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'" @click="WithdrawnErrorFlag = false">{{ item
 | 
					              style="color: #02a7f1; border-bottom: 1px solid #02a7f1; margin-right: 8px"
 | 
				
			||||||
              }}</span>
 | 
					              :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'"
 | 
				
			||||||
 | 
					              @click="WithdrawnErrorFlag = false"
 | 
				
			||||||
 | 
					              >{{ item }}</span
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
          </router-link>
 | 
					          </router-link>
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
        <p style="margin-bottom: 0px;">请溯源后撤销该单据。</p>
 | 
					        <p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { listRtissue, getRtissue, delRtissue, addRtissue, updateRtissue, execute, cancelFn } from "@/api/mes/wm/rtissue";
 | 
					import {
 | 
				
			||||||
import WorkorderSelect from "@/components/workorderSelect/single.vue"
 | 
					  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 Rtissueline from "./line.vue";
 | 
				
			||||||
import { getTreeList } from "@/api/mes/wm/warehouse"
 | 
					import { getTreeList } from "@/api/mes/wm/warehouse";
 | 
				
			||||||
import { genCode } from "@/api/system/autocode/rule"
 | 
					import { genCode } from "@/api/system/autocode/rule";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "Rtissue",
 | 
					  name: "Rtissue",
 | 
				
			||||||
  dicts: ['mes_order_status'],
 | 
					  dicts: ["mes_order_status"],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    Rtissueline, WorkorderSelect
 | 
					    Rtissueline,
 | 
				
			||||||
 | 
					    WorkorderSelect,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -232,8 +406,8 @@ export default {
 | 
				
			|||||||
      warehouseOptions: [],
 | 
					      warehouseOptions: [],
 | 
				
			||||||
      warehouseProps: {
 | 
					      warehouseProps: {
 | 
				
			||||||
        multiple: false,
 | 
					        multiple: false,
 | 
				
			||||||
        value: 'pId',
 | 
					        value: "pId",
 | 
				
			||||||
        label: 'pName',
 | 
					        label: "pName",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 遮罩层
 | 
					      // 遮罩层
 | 
				
			||||||
      loading: true,
 | 
					      loading: true,
 | 
				
			||||||
@@ -273,29 +447,26 @@ export default {
 | 
				
			|||||||
        rtDate: null,
 | 
					        rtDate: null,
 | 
				
			||||||
        status: null,
 | 
					        status: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        rtCode: [
 | 
					        rtCode: [{ required: true, message: "退料单编号不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "退料单编号不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        workorderCode: [
 | 
					        workorderCode: [
 | 
				
			||||||
          { required: true, message: "请选择要退料的生产工单", trigger: "blur" }
 | 
					          { required: true, message: "请选择要退料的生产工单", trigger: "blur" },
 | 
				
			||||||
        ]
 | 
					        ],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 单据撤销 对话框 开关
 | 
					      // 单据撤销 对话框 开关
 | 
				
			||||||
      WithdrawnFlag: false,
 | 
					      WithdrawnFlag: false,
 | 
				
			||||||
      // 单据撤销 对话框 表单参数
 | 
					      // 单据撤销 对话框 表单参数
 | 
				
			||||||
      WithdrawnForm: {
 | 
					      WithdrawnForm: {
 | 
				
			||||||
        rtId: null,
 | 
					        rtId: null,
 | 
				
			||||||
        cancelRemark: null
 | 
					        cancelRemark: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 撤销单 表单校验
 | 
					      // 撤销单 表单校验
 | 
				
			||||||
      WithdrawnRules: {
 | 
					      WithdrawnRules: {
 | 
				
			||||||
        cancelRemark: [
 | 
					        cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "撤销原因不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 查看撤销原因 以及 开关
 | 
					      // 查看撤销原因 以及 开关
 | 
				
			||||||
      LookWithdrawnFlag: false,
 | 
					      LookWithdrawnFlag: false,
 | 
				
			||||||
@@ -329,30 +500,39 @@ export default {
 | 
				
			|||||||
    /** 查询生产退料单头列表 */
 | 
					    /** 查询生产退料单头列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listRtissue(this.queryParams).then(response => {
 | 
					      listRtissue(this.addDateRange(this.queryParams, this.dateRange)).then(
 | 
				
			||||||
 | 
					        (response) => {
 | 
				
			||||||
          this.rtissueList = response.rows;
 | 
					          this.rtissueList = response.rows;
 | 
				
			||||||
          this.total = response.total;
 | 
					          this.total = response.total;
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
      });
 | 
					        }
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getWarehouseList() {
 | 
					    getWarehouseList() {
 | 
				
			||||||
      getTreeList().then(response => {
 | 
					      getTreeList().then((response) => {
 | 
				
			||||||
        if (response.data) {
 | 
					        if (response.data) {
 | 
				
			||||||
          this.warehouseOptions = response.data.filter((el) => {
 | 
					          this.warehouseOptions = response.data.filter((el) => {
 | 
				
			||||||
            return el.warehouseCode.indexOf('VIR') == -1;
 | 
					            return el.warehouseCode.indexOf("VIR") == -1;
 | 
				
			||||||
          });;
 | 
					          });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this.warehouseOptions.map(w => {
 | 
					        this.warehouseOptions.map((w) => {
 | 
				
			||||||
          w.children.map(l => {
 | 
					          w.children.map((l) => {
 | 
				
			||||||
            let lstr = JSON.stringify(l.children).replace(/locationId/g, 'lId').replace(/areaId/g, 'pId').replace(/areaName/g, 'pName');
 | 
					            let lstr = JSON.stringify(l.children)
 | 
				
			||||||
 | 
					              .replace(/locationId/g, "lId")
 | 
				
			||||||
 | 
					              .replace(/areaId/g, "pId")
 | 
				
			||||||
 | 
					              .replace(/areaName/g, "pName");
 | 
				
			||||||
            l.children = JSON.parse(lstr);
 | 
					            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);
 | 
					          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);
 | 
					        this.warehouseOptions = JSON.parse(ostr);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -388,7 +568,7 @@ export default {
 | 
				
			|||||||
        createBy: null,
 | 
					        createBy: null,
 | 
				
			||||||
        createTime: null,
 | 
					        createTime: null,
 | 
				
			||||||
        updateBy: null,
 | 
					        updateBy: null,
 | 
				
			||||||
        updateTime: null
 | 
					        updateTime: null,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      this.autoGenFlag = false;
 | 
					      this.autoGenFlag = false;
 | 
				
			||||||
      this.resetForm("form");
 | 
					      this.resetForm("form");
 | 
				
			||||||
@@ -400,14 +580,15 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					      this.resetForm("queryForm");
 | 
				
			||||||
      this.handleQuery();
 | 
					      this.handleQuery();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.rtId)
 | 
					      this.ids = selection.map((item) => item.rtId);
 | 
				
			||||||
      this.single = selection.length !== 1
 | 
					      this.single = selection.length !== 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 新增按钮操作 */
 | 
					    /** 新增按钮操作 */
 | 
				
			||||||
    handleAdd() {
 | 
					    handleAdd() {
 | 
				
			||||||
@@ -419,8 +600,8 @@ export default {
 | 
				
			|||||||
    /** 修改按钮操作 */
 | 
					    /** 修改按钮操作 */
 | 
				
			||||||
    handleUpdate(row) {
 | 
					    handleUpdate(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const rtId = row.rtId || this.ids
 | 
					      const rtId = row.rtId || this.ids;
 | 
				
			||||||
      getRtissue(rtId).then(response => {
 | 
					      getRtissue(rtId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.warehouseInfo[0] = response.data.warehouseId;
 | 
					        this.warehouseInfo[0] = response.data.warehouseId;
 | 
				
			||||||
        this.warehouseInfo[1] = response.data.locationId;
 | 
					        this.warehouseInfo[1] = response.data.locationId;
 | 
				
			||||||
@@ -433,8 +614,8 @@ export default {
 | 
				
			|||||||
    // 查询明细按钮操作
 | 
					    // 查询明细按钮操作
 | 
				
			||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const rtId = row.rtId
 | 
					      const rtId = row.rtId;
 | 
				
			||||||
      getRtissue(rtId).then(response => {
 | 
					      getRtissue(rtId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.warehouseInfo[0] = response.data.warehouseId;
 | 
					        this.warehouseInfo[0] = response.data.warehouseId;
 | 
				
			||||||
        this.warehouseInfo[1] = response.data.locationId;
 | 
					        this.warehouseInfo[1] = response.data.locationId;
 | 
				
			||||||
@@ -446,16 +627,16 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 提交按钮 */
 | 
					    /** 提交按钮 */
 | 
				
			||||||
    submitForm() {
 | 
					    submitForm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (this.form.rtId != null) {
 | 
					          if (this.form.rtId != null) {
 | 
				
			||||||
            updateRtissue(this.form).then(response => {
 | 
					            updateRtissue(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("修改成功");
 | 
					              this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            addRtissue(this.form).then(response => {
 | 
					            addRtissue(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("新增成功");
 | 
					              this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
@@ -467,28 +648,40 @@ export default {
 | 
				
			|||||||
    //执行退料
 | 
					    //执行退料
 | 
				
			||||||
    handleExecute(row) {
 | 
					    handleExecute(row) {
 | 
				
			||||||
      const rtIds = row.rtId || this.ids;
 | 
					      const rtIds = row.rtId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('确认执行退料?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
        return execute(rtIds)//执行退料
 | 
					        .confirm("确认执行退料?")
 | 
				
			||||||
      }).then(() => {
 | 
					        .then(function () {
 | 
				
			||||||
 | 
					          return execute(rtIds); //执行退料
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("退料成功");
 | 
					          this.$modal.msgSuccess("退料成功");
 | 
				
			||||||
      }).catch(() => { });
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      const rtIds = row.rtId || this.ids;
 | 
					      const rtIds = row.rtId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('是否确认删除生产退料单头编号为"' + rtIds + '"的数据项?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm('是否确认删除生产退料单头编号为"' + rtIds + '"的数据项?')
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return delRtissue(rtIds);
 | 
					          return delRtissue(rtIds);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => { });
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/wm/rtissue/export', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/wm/rtissue/export",
 | 
				
			||||||
      }, `rtissue_${new Date().getTime()}.xlsx`)
 | 
					        {
 | 
				
			||||||
 | 
					          ...this.queryParams,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        `rtissue_${new Date().getTime()}.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //选择默认的仓库、库区、库位
 | 
					    //选择默认的仓库、库区、库位
 | 
				
			||||||
    handleWarehouseChanged(obj) {
 | 
					    handleWarehouseChanged(obj) {
 | 
				
			||||||
@@ -507,19 +700,19 @@ export default {
 | 
				
			|||||||
        this.form.workorderId = row.workorderId;
 | 
					        this.form.workorderId = row.workorderId;
 | 
				
			||||||
        this.form.workorderCode = row.workorderCode;
 | 
					        this.form.workorderCode = row.workorderCode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.form.machineryId = row.machineryId
 | 
					        this.form.machineryId = row.machineryId;
 | 
				
			||||||
        this.form.machineryCode = row.machineryCode
 | 
					        this.form.machineryCode = row.machineryCode;
 | 
				
			||||||
        this.form.machineryName = row.machineryName
 | 
					        this.form.machineryName = row.machineryName;
 | 
				
			||||||
        this.form.machineryNo = row.machineryNo
 | 
					        this.form.machineryNo = row.machineryNo;
 | 
				
			||||||
        this.form.teamId = row.teamId
 | 
					        this.form.teamId = row.teamId;
 | 
				
			||||||
        this.form.teamCode = row.teamCode
 | 
					        this.form.teamCode = row.teamCode;
 | 
				
			||||||
        this.form.teamName = row.teamName
 | 
					        this.form.teamName = row.teamName;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //自动生成编码
 | 
					    //自动生成编码
 | 
				
			||||||
    handleAutoGenChange(autoGenFlag) {
 | 
					    handleAutoGenChange(autoGenFlag) {
 | 
				
			||||||
      if (autoGenFlag) {
 | 
					      if (autoGenFlag) {
 | 
				
			||||||
        genCode('RTISSUE_CODE').then(response => {
 | 
					        genCode("RTISSUE_CODE").then((response) => {
 | 
				
			||||||
          this.form.rtCode = response;
 | 
					          this.form.rtCode = response;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
@@ -534,27 +727,29 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 撤销原因 提交
 | 
					    // 撤销原因 提交
 | 
				
			||||||
    handleWithdrawnSubmit(formName) {
 | 
					    handleWithdrawnSubmit(formName) {
 | 
				
			||||||
      this.$refs['WithdrawnForm'].validate((valid) => {
 | 
					      this.$refs["WithdrawnForm"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          cancelFn(this.WithdrawnForm).then((res) => {
 | 
					          cancelFn(this.WithdrawnForm)
 | 
				
			||||||
 | 
					            .then((res) => {
 | 
				
			||||||
              console.log(res);
 | 
					              console.log(res);
 | 
				
			||||||
              if (res.code == 200) {
 | 
					              if (res.code == 200) {
 | 
				
			||||||
                this.$modal.msgSuccess(res.msg);
 | 
					                this.$modal.msgSuccess(res.msg);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
          }).catch((res) => {
 | 
					            })
 | 
				
			||||||
 | 
					            .catch((res) => {
 | 
				
			||||||
              console.log(res.data);
 | 
					              console.log(res.data);
 | 
				
			||||||
              // 错误提示 对象 (内容)
 | 
					              // 错误提示 对象 (内容)
 | 
				
			||||||
              this.WithdrawnErrorObj = res.data;
 | 
					              this.WithdrawnErrorObj = res.data;
 | 
				
			||||||
              // 打开错误提示 对话框
 | 
					              // 打开错误提示 对话框
 | 
				
			||||||
              this.WithdrawnErrorFlag = true;
 | 
					              this.WithdrawnErrorFlag = true;
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
          }).finally(() => {
 | 
					            .finally(() => {
 | 
				
			||||||
              this.WithdrawnFlag = false;
 | 
					              this.WithdrawnFlag = false;
 | 
				
			||||||
            this.$refs['WithdrawnForm'].resetFields();
 | 
					              this.$refs["WithdrawnForm"].resetFields();
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          console.log('error submit!!');
 | 
					          console.log("error submit!!");
 | 
				
			||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@@ -565,7 +760,7 @@ export default {
 | 
				
			|||||||
      this.LookWithdrawn = val.cancelRemark;
 | 
					      this.LookWithdrawn = val.cancelRemark;
 | 
				
			||||||
      this.LookWithdrawnFlag = true;
 | 
					      this.LookWithdrawnFlag = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,67 +1,154 @@
 | 
				
			|||||||
/*
 | 
					/* 2024 12 16 Name:"销售退货父组件" */
 | 
				
			||||||
2024 12 16
 | 
					 | 
				
			||||||
Name:"销售退货父组件"
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <el-form-item label="销售订单编号" prop="soCode">
 | 
					      <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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <el-form-item label="客户名称" prop="clientName">
 | 
					      <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>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <el-form-item label="仓库名称" prop="warehouseName">
 | 
					      <el-form-item label="仓库名称" prop="warehouseName">
 | 
				
			||||||
        <el-input v-model="queryParams.warehouseName" placeholder="请输入仓库名称" clearable
 | 
					        <el-input
 | 
				
			||||||
          @keyup.enter.native="handleQuery" />
 | 
					          v-model="queryParams.warehouseName"
 | 
				
			||||||
 | 
					          placeholder="请输入仓库名称"
 | 
				
			||||||
 | 
					          clearable
 | 
				
			||||||
 | 
					          @keyup.enter.native="handleQuery"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <el-form-item label="单据状态" prop="status">
 | 
					      <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
        <el-select v-model="queryParams.status" placeholder="请选择单据状态" clearable>
 | 
					        <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"
 | 
					          <el-option
 | 
				
			||||||
            :value="dict.value" />
 | 
					            v-for="dict in dict.type.mes_order_status"
 | 
				
			||||||
 | 
					            :key="dict.value"
 | 
				
			||||||
 | 
					            :label="dict.label"
 | 
				
			||||||
 | 
					            :value="dict.value"
 | 
				
			||||||
 | 
					          />
 | 
				
			||||||
        </el-select>
 | 
					        </el-select>
 | 
				
			||||||
      </el-form-item>
 | 
					      </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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtsalse:add']">新增</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtsalse:edit']">修改</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtsalse:remove']">删除</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>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="退货单编号" width="140px" align="center" prop="rtCode">
 | 
					      <el-table-column label="退货单编号" width="140px" align="center" prop="rtCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:rtsalse:query']">{{
 | 
					          <el-button
 | 
				
			||||||
            scope.row.rtCode }}</el-button>
 | 
					            type="text"
 | 
				
			||||||
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
 | 
					            v-hasPermi="['mes:wm:rtsalse:query']"
 | 
				
			||||||
 | 
					            >{{ scope.row.rtCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="退货单名称" width="150px" align="center" prop="rtName" :show-overflow-tooltip="true" />
 | 
					      <el-table-column
 | 
				
			||||||
      <el-table-column label="销售出库单编号" width="120px" align="center" prop="salseCode" />
 | 
					        label="退货单名称"
 | 
				
			||||||
      <el-table-column label="客户名称" width="150px" align="center" prop="clientName" :show-overflow-tooltip="true" />
 | 
					        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="warehouseName" />
 | 
				
			||||||
      <el-table-column label="库区" align="center" prop="locationName" />
 | 
					      <el-table-column label="库区" align="center" prop="locationName" />
 | 
				
			||||||
      <el-table-column label="库位" align="center" prop="areaName" />
 | 
					      <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" />
 | 
					          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
 | 
					          <el-button
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:rtsalse:edit']">修改</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
 | 
					            type="text"
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:rtsalse:remove']">删除</el-button>
 | 
					            icon="el-icon-edit"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-video-play" @click="handleExecute(scope.row)"
 | 
					            @click="handleUpdate(scope.row)"
 | 
				
			||||||
            v-if="scope.row.status == 'PREPARE'" v-hasPermi="['mes:wm:rtsalse:edit']">执行退货</el-button>
 | 
					            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'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtsalse:edit']">撤销</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtsalse:edit']">查看撤销原因</el-button>
 | 
					            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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
					    <pagination
 | 
				
			||||||
      @pagination="getList" />
 | 
					      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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
 | 
				
			||||||
@@ -109,8 +241,13 @@ Name:"销售退货父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                active-text="自动生成"
 | 
				
			||||||
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view' && form.status == 'PREPARE'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -124,43 +261,71 @@ Name:"销售退货父组件"
 | 
				
			|||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="销售出库单编号">
 | 
					            <el-form-item label="销售出库单编号">
 | 
				
			||||||
              <el-input v-model="form.salseCode" placeholder="请选择" readonly>
 | 
					              <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
            <ProductSaleSelect ref="productSaleSelect" @onSelected="productSaleSelect"></ProductSaleSelect>
 | 
					            <ProductSaleSelect
 | 
				
			||||||
 | 
					              ref="productSaleSelect"
 | 
				
			||||||
 | 
					              @onSelected="productSaleSelect"
 | 
				
			||||||
 | 
					            ></ProductSaleSelect>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="客户编号" prop="clientCode">
 | 
					            <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-input>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="客户名称" prop="clientName">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="退货日期" prop="rtDate">
 | 
					            <el-form-item label="退货日期" prop="rtDate">
 | 
				
			||||||
              <el-date-picker clearable v-model="form.rtDate" type="date" value-format="yyyy-MM-dd"
 | 
					              <el-date-picker
 | 
				
			||||||
                placeholder="请选择退货日期">
 | 
					                clearable
 | 
				
			||||||
 | 
					                v-model="form.rtDate"
 | 
				
			||||||
 | 
					                type="date"
 | 
				
			||||||
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                placeholder="请选择退货日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="退货仓库">
 | 
					            <el-form-item label="退货仓库">
 | 
				
			||||||
              <el-cascader v-model="warehouseInfo" :options="warehouseOptions" :props="warehouseProps"
 | 
					              <el-cascader
 | 
				
			||||||
                @change="handleWarehouseChanged">
 | 
					                v-model="warehouseInfo"
 | 
				
			||||||
 | 
					                :options="warehouseOptions"
 | 
				
			||||||
 | 
					                :props="warehouseProps"
 | 
				
			||||||
 | 
					                @change="handleWarehouseChanged"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-cascader>
 | 
					              </el-cascader>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="单据状态" prop="status">
 | 
					            <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
              <el-select v-model="form.status" disabled placeholder="请选择单据状态">
 | 
					              <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"
 | 
					                <el-option
 | 
				
			||||||
                  :value="dict.value"></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-select>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -168,7 +333,11 @@ Name:"销售退货父组件"
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="24">
 | 
					          <el-col :span="24">
 | 
				
			||||||
            <el-form-item label="退货原因" prop="rtReason">
 | 
					            <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-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
@@ -185,18 +354,36 @@ Name:"销售退货父组件"
 | 
				
			|||||||
        <Rtsalseline ref="rtsalseline" :rtId="form.rtId" :optType="optType"></Rtsalseline>
 | 
					        <Rtsalseline ref="rtsalseline" :rtId="form.rtId" :optType="optType"></Rtsalseline>
 | 
				
			||||||
      </el-card>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">确
 | 
					          type="primary"
 | 
				
			||||||
          定</el-button>
 | 
					          @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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八 单据撤销 对话框 -->
 | 
					    <!-- 需求八 单据撤销 对话框 -->
 | 
				
			||||||
    <el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
 | 
					    <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-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-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <span slot="footer" class="dialog-footer">
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
@@ -218,50 +405,63 @@ Name:"销售退货父组件"
 | 
				
			|||||||
    <!-- 撤销错误 对话框 提示 需求八 -->
 | 
					    <!-- 撤销错误 对话框 提示 需求八 -->
 | 
				
			||||||
    <el-dialog title="提示" :visible.sync="WithdrawnErrorFlag" width="45%">
 | 
					    <el-dialog title="提示" :visible.sync="WithdrawnErrorFlag" width="45%">
 | 
				
			||||||
      <div>
 | 
					      <div>
 | 
				
			||||||
        <p style="margin-top: 0px;">当前单据部分产品物料已出库,相关单据:</p>
 | 
					        <p style="margin-top: 0px">当前单据部分产品物料已出库,相关单据:</p>
 | 
				
			||||||
        <p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
 | 
					        <p v-for="(value, name, index) in WithdrawnErrorObj" :key="index">
 | 
				
			||||||
          <span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
 | 
					          <span>{{ WithdrawnErrorObjMap[name].CNName }}:</span>
 | 
				
			||||||
          <router-link :to="{
 | 
					          <router-link
 | 
				
			||||||
 | 
					            :to="{
 | 
				
			||||||
              path: WithdrawnErrorObjMap[name].path,
 | 
					              path: WithdrawnErrorObjMap[name].path,
 | 
				
			||||||
              query: { Parameters: item },
 | 
					              query: { Parameters: item },
 | 
				
			||||||
          }" v-for="(item, ind) in value" :key="ind">
 | 
					            }"
 | 
				
			||||||
            <span style="
 | 
					            v-for="(item, ind) in value"
 | 
				
			||||||
                color: #02a7f1;
 | 
					            :key="ind"
 | 
				
			||||||
                border-bottom: 1px solid #02a7f1;
 | 
					          >
 | 
				
			||||||
                margin-right: 8px;
 | 
					            <span
 | 
				
			||||||
              " :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'" @click="WithdrawnErrorFlag = false">{{ item
 | 
					              style="color: #02a7f1; border-bottom: 1px solid #02a7f1; margin-right: 8px"
 | 
				
			||||||
              }}</span>
 | 
					              :id="value.length - 1 == ind ? '' : 'WithdrawnErrorObj'"
 | 
				
			||||||
 | 
					              @click="WithdrawnErrorFlag = false"
 | 
				
			||||||
 | 
					              >{{ item }}</span
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
          </router-link>
 | 
					          </router-link>
 | 
				
			||||||
        </p>
 | 
					        </p>
 | 
				
			||||||
        <p style="margin-bottom: 0px;">请溯源后撤销该单据。</p>
 | 
					        <p style="margin-bottom: 0px">请溯源后撤销该单据。</p>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<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 { listBySalseCode } from "@/api/mes/wm/productsalseline";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import Rtsalseline from "./line.vue";
 | 
					import Rtsalseline from "./line.vue";
 | 
				
			||||||
import ProductSaleSelect from "@/components/ProductSaleSelect/single.vue"
 | 
					import ProductSaleSelect from "@/components/ProductSaleSelect/single.vue";
 | 
				
			||||||
import { getTreeList } from "@/api/mes/wm/warehouse"
 | 
					import { getTreeList } from "@/api/mes/wm/warehouse";
 | 
				
			||||||
import { genCode } from "@/api/system/autocode/rule"
 | 
					import { genCode } from "@/api/system/autocode/rule";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "Rtsalse",
 | 
					  name: "Rtsalse",
 | 
				
			||||||
  dicts: ['mes_order_status'],
 | 
					  dicts: ["mes_order_status"],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    ProductSaleSelect, Rtsalseline
 | 
					    ProductSaleSelect,
 | 
				
			||||||
 | 
					    Rtsalseline,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    "form.salseCode"(val) {
 | 
					    "form.salseCode"(val) {
 | 
				
			||||||
      if (!val) {
 | 
					      if (!val) {
 | 
				
			||||||
        return
 | 
					        return;
 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      listBySalseCode({ salseCode: this.form.salseCode }).then(response => {
 | 
					 | 
				
			||||||
        this.$refs.rtsalseline.setProductsalselineList(response.data)
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      listBySalseCode({ salseCode: this.form.salseCode }).then((response) => {
 | 
				
			||||||
 | 
					        this.$refs.rtsalseline.setProductsalselineList(response.data);
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -272,8 +472,8 @@ export default {
 | 
				
			|||||||
      warehouseOptions: [],
 | 
					      warehouseOptions: [],
 | 
				
			||||||
      warehouseProps: {
 | 
					      warehouseProps: {
 | 
				
			||||||
        multiple: false,
 | 
					        multiple: false,
 | 
				
			||||||
        value: 'pId',
 | 
					        value: "pId",
 | 
				
			||||||
        label: 'pName',
 | 
					        label: "pName",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 遮罩层
 | 
					      // 遮罩层
 | 
				
			||||||
      loading: true,
 | 
					      loading: true,
 | 
				
			||||||
@@ -321,41 +521,30 @@ export default {
 | 
				
			|||||||
        attr3: null,
 | 
					        attr3: null,
 | 
				
			||||||
        attr4: null,
 | 
					        attr4: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        rtCode: [
 | 
					        rtCode: [{ required: true, message: "退货单编号不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "退货单编号不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        // rtName: [
 | 
					        // rtName: [
 | 
				
			||||||
        //   { required: true, message: "退货单名称不能为空", trigger: "blur" }
 | 
					        //   { required: true, message: "退货单名称不能为空", trigger: "blur" }
 | 
				
			||||||
        // ],
 | 
					        // ],
 | 
				
			||||||
        rtDate: [
 | 
					        rtDate: [{ required: true, message: "请选择退货日期", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "请选择退货日期", trigger: "blur" }
 | 
					        salseCode: [{ required: true, message: "请选择销售单", trigger: "blur" }],
 | 
				
			||||||
        ],
 | 
					        clientCode: [{ required: true, message: "请选择客户", trigger: "blur" }],
 | 
				
			||||||
        salseCode: [
 | 
					        rtReason: [{ required: true, message: "请填写退货原因", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "请选择销售单", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        clientCode: [
 | 
					 | 
				
			||||||
          { required: true, message: "请选择客户", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        rtReason: [
 | 
					 | 
				
			||||||
          { required: true, message: "请填写退货原因", trigger: "blur" }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 单据撤销 对话框 开关
 | 
					      // 单据撤销 对话框 开关
 | 
				
			||||||
      WithdrawnFlag: false,
 | 
					      WithdrawnFlag: false,
 | 
				
			||||||
      // 单据撤销 对话框 表单参数
 | 
					      // 单据撤销 对话框 表单参数
 | 
				
			||||||
      WithdrawnForm: {
 | 
					      WithdrawnForm: {
 | 
				
			||||||
        rtId: null,
 | 
					        rtId: null,
 | 
				
			||||||
        cancelRemark: null
 | 
					        cancelRemark: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 撤销单 表单校验
 | 
					      // 撤销单 表单校验
 | 
				
			||||||
      WithdrawnRules: {
 | 
					      WithdrawnRules: {
 | 
				
			||||||
        cancelRemark: [
 | 
					        cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "撤销原因不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 查看撤销原因 以及 开关
 | 
					      // 查看撤销原因 以及 开关
 | 
				
			||||||
      LookWithdrawnFlag: false,
 | 
					      LookWithdrawnFlag: false,
 | 
				
			||||||
@@ -389,30 +578,37 @@ export default {
 | 
				
			|||||||
    /** 查询产品销售退货单列表 */
 | 
					    /** 查询产品销售退货单列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listRtsalse(this.queryParams).then(response => {
 | 
					      listRtsalse(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
 | 
				
			||||||
        this.rtsalseList = response.rows;
 | 
					        this.rtsalseList = response.rows;
 | 
				
			||||||
        this.total = response.total;
 | 
					        this.total = response.total;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getWarehouseList() {
 | 
					    getWarehouseList() {
 | 
				
			||||||
      getTreeList().then(response => {
 | 
					      getTreeList().then((response) => {
 | 
				
			||||||
        if (response.data) {
 | 
					        if (response.data) {
 | 
				
			||||||
          this.warehouseOptions = response.data.filter((el) => {
 | 
					          this.warehouseOptions = response.data.filter((el) => {
 | 
				
			||||||
            return el.warehouseCode.indexOf('VIR') == -1;
 | 
					            return el.warehouseCode.indexOf("VIR") == -1;
 | 
				
			||||||
          });;
 | 
					          });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this.warehouseOptions.map(w => {
 | 
					        this.warehouseOptions.map((w) => {
 | 
				
			||||||
          w.children.map(l => {
 | 
					          w.children.map((l) => {
 | 
				
			||||||
            let lstr = JSON.stringify(l.children).replace(/locationId/g, 'lId').replace(/areaId/g, 'pId').replace(/areaName/g, 'pName');
 | 
					            let lstr = JSON.stringify(l.children)
 | 
				
			||||||
 | 
					              .replace(/locationId/g, "lId")
 | 
				
			||||||
 | 
					              .replace(/areaId/g, "pId")
 | 
				
			||||||
 | 
					              .replace(/areaName/g, "pName");
 | 
				
			||||||
            l.children = JSON.parse(lstr);
 | 
					            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);
 | 
					          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);
 | 
					        this.warehouseOptions = JSON.parse(ostr);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -460,7 +656,7 @@ export default {
 | 
				
			|||||||
        createBy: null,
 | 
					        createBy: null,
 | 
				
			||||||
        createTime: null,
 | 
					        createTime: null,
 | 
				
			||||||
        updateBy: null,
 | 
					        updateBy: null,
 | 
				
			||||||
        updateTime: null
 | 
					        updateTime: null,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      this.autoGenFlag = false;
 | 
					      this.autoGenFlag = false;
 | 
				
			||||||
      this.resetForm("form");
 | 
					      this.resetForm("form");
 | 
				
			||||||
@@ -472,14 +668,15 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					      this.resetForm("queryForm");
 | 
				
			||||||
      this.handleQuery();
 | 
					      this.handleQuery();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.rtId)
 | 
					      this.ids = selection.map((item) => item.rtId);
 | 
				
			||||||
      this.single = selection.length !== 1
 | 
					      this.single = selection.length !== 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //客户选择事件
 | 
					    //客户选择事件
 | 
				
			||||||
    handleProductSaleSelect() {
 | 
					    handleProductSaleSelect() {
 | 
				
			||||||
@@ -504,8 +701,8 @@ export default {
 | 
				
			|||||||
    // 查询明细按钮操作
 | 
					    // 查询明细按钮操作
 | 
				
			||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const rtIds = row.rtId
 | 
					      const rtIds = row.rtId;
 | 
				
			||||||
      getRtsalse(rtIds).then(response => {
 | 
					      getRtsalse(rtIds).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.warehouseInfo[0] = response.data.warehouseId;
 | 
					        this.warehouseInfo[0] = response.data.warehouseId;
 | 
				
			||||||
        this.warehouseInfo[1] = response.data.locationId;
 | 
					        this.warehouseInfo[1] = response.data.locationId;
 | 
				
			||||||
@@ -518,18 +715,22 @@ export default {
 | 
				
			|||||||
    //执行入库
 | 
					    //执行入库
 | 
				
			||||||
    handleExecute(row) {
 | 
					    handleExecute(row) {
 | 
				
			||||||
      const rtIds = row.rtId || this.ids;
 | 
					      const rtIds = row.rtId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('确认执行退货?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
        return execute(rtIds)//执行退货
 | 
					        .confirm("确认执行退货?")
 | 
				
			||||||
      }).then(() => {
 | 
					        .then(function () {
 | 
				
			||||||
 | 
					          return execute(rtIds); //执行退货
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("退货成功");
 | 
					          this.$modal.msgSuccess("退货成功");
 | 
				
			||||||
      }).catch(() => { });
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 修改按钮操作 */
 | 
					    /** 修改按钮操作 */
 | 
				
			||||||
    handleUpdate(row) {
 | 
					    handleUpdate(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const rtId = row.rtId || this.ids
 | 
					      const rtId = row.rtId || this.ids;
 | 
				
			||||||
      getRtsalse(rtId).then(response => {
 | 
					      getRtsalse(rtId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.warehouseInfo[0] = response.data.warehouseId;
 | 
					        this.warehouseInfo[0] = response.data.warehouseId;
 | 
				
			||||||
        this.warehouseInfo[1] = response.data.locationId;
 | 
					        this.warehouseInfo[1] = response.data.locationId;
 | 
				
			||||||
@@ -541,16 +742,16 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 提交按钮 */
 | 
					    /** 提交按钮 */
 | 
				
			||||||
    submitForm() {
 | 
					    submitForm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (this.form.rtId != null) {
 | 
					          if (this.form.rtId != null) {
 | 
				
			||||||
            updateRtsalse(this.form).then(response => {
 | 
					            updateRtsalse(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("修改成功");
 | 
					              this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            addRtsalse(this.form).then(response => {
 | 
					            addRtsalse(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("新增成功");
 | 
					              this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
@@ -562,23 +763,31 @@ export default {
 | 
				
			|||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      const rtIds = row.rtId || this.ids;
 | 
					      const rtIds = row.rtId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('是否确认删除产品销售退货单编号为"' + rtIds + '"的数据项?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm('是否确认删除产品销售退货单编号为"' + rtIds + '"的数据项?')
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return delRtsalse(rtIds);
 | 
					          return delRtsalse(rtIds);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => { });
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/wm/rtsalse/export', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/wm/rtsalse/export",
 | 
				
			||||||
      }, `rtsalse_${new Date().getTime()}.xlsx`)
 | 
					        {
 | 
				
			||||||
 | 
					          ...this.queryParams,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        `rtsalse_${new Date().getTime()}.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //自动生成编码
 | 
					    //自动生成编码
 | 
				
			||||||
    handleAutoGenChange(autoGenFlag) {
 | 
					    handleAutoGenChange(autoGenFlag) {
 | 
				
			||||||
      if (autoGenFlag) {
 | 
					      if (autoGenFlag) {
 | 
				
			||||||
        genCode('RTSALSE_CODE').then(response => {
 | 
					        genCode("RTSALSE_CODE").then((response) => {
 | 
				
			||||||
          this.form.rtCode = response;
 | 
					          this.form.rtCode = response;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
@@ -593,27 +802,29 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 撤销原因 提交
 | 
					    // 撤销原因 提交
 | 
				
			||||||
    handleWithdrawnSubmit(formName) {
 | 
					    handleWithdrawnSubmit(formName) {
 | 
				
			||||||
      this.$refs['WithdrawnForm'].validate((valid) => {
 | 
					      this.$refs["WithdrawnForm"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          cancelFn(this.WithdrawnForm).then((res) => {
 | 
					          cancelFn(this.WithdrawnForm)
 | 
				
			||||||
 | 
					            .then((res) => {
 | 
				
			||||||
              console.log(res);
 | 
					              console.log(res);
 | 
				
			||||||
              if (res.code == 200) {
 | 
					              if (res.code == 200) {
 | 
				
			||||||
                this.$modal.msgSuccess(res.msg);
 | 
					                this.$modal.msgSuccess(res.msg);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
          }).catch((res) => {
 | 
					            })
 | 
				
			||||||
 | 
					            .catch((res) => {
 | 
				
			||||||
              console.log(res.data);
 | 
					              console.log(res.data);
 | 
				
			||||||
              // 错误提示 对象 (内容)
 | 
					              // 错误提示 对象 (内容)
 | 
				
			||||||
              this.WithdrawnErrorObj = res.data;
 | 
					              this.WithdrawnErrorObj = res.data;
 | 
				
			||||||
              // 打开错误提示 对话框
 | 
					              // 打开错误提示 对话框
 | 
				
			||||||
              this.WithdrawnErrorFlag = true;
 | 
					              this.WithdrawnErrorFlag = true;
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
          }).finally(() => {
 | 
					            .finally(() => {
 | 
				
			||||||
              this.WithdrawnFlag = false;
 | 
					              this.WithdrawnFlag = false;
 | 
				
			||||||
            this.$refs['WithdrawnForm'].resetFields();
 | 
					              this.$refs["WithdrawnForm"].resetFields();
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          console.log('error submit!!');
 | 
					          console.log("error submit!!");
 | 
				
			||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@@ -624,7 +835,7 @@ export default {
 | 
				
			|||||||
      this.LookWithdrawn = val.cancelRemark;
 | 
					      this.LookWithdrawn = val.cancelRemark;
 | 
				
			||||||
      this.LookWithdrawnFlag = true;
 | 
					      this.LookWithdrawnFlag = true;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,64 +1,145 @@
 | 
				
			|||||||
/*
 | 
					/* 2024 12 16 Name:"供应商退货父组件" */
 | 
				
			||||||
2024 12 16
 | 
					 | 
				
			||||||
Name:"供应商退货父组件"
 | 
					 | 
				
			||||||
*/
 | 
					 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="app-container">
 | 
					  <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-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>
 | 
				
			||||||
      <el-form-item label="退货单名称" prop="rtName">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="采购订单编号" prop="poCode">
 | 
					      <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>
 | 
				
			||||||
      <el-form-item label="供应商名称" prop="vendorName">
 | 
					      <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-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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <el-row :gutter="10" class="mb8">
 | 
					    <el-row :gutter="10" class="mb8">
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtvendor:add']">新增</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtvendor:edit']">修改</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtvendor:remove']">删除</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>
 | 
				
			||||||
      <el-col :span="1.5">
 | 
					      <el-col :span="1.5">
 | 
				
			||||||
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
 | 
					        <el-button
 | 
				
			||||||
          v-hasPermi="['mes:wm:rtvendor:export']">导出</el-button>
 | 
					          type="warning"
 | 
				
			||||||
 | 
					          plain
 | 
				
			||||||
 | 
					          icon="el-icon-download"
 | 
				
			||||||
 | 
					          size="mini"
 | 
				
			||||||
 | 
					          @click="handleExport"
 | 
				
			||||||
 | 
					          v-hasPermi="['mes:wm:rtvendor:export']"
 | 
				
			||||||
 | 
					          >导出</el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
					      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 | 
				
			||||||
    </el-row>
 | 
					    </el-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八:2025 01 09 -->
 | 
					    <!-- 需求八: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 type="selection" width="55" align="center" />
 | 
				
			||||||
      <el-table-column label="退货单编号" align="center" prop="rtCode">
 | 
					      <el-table-column label="退货单编号" align="center" prop="rtCode">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button type="text" @click="handleView(scope.row)" v-hasPermi="['mes:wm:rtvendor:query']">{{
 | 
					          <el-button
 | 
				
			||||||
            scope.row.rtCode }}</el-button>
 | 
					            type="text"
 | 
				
			||||||
 | 
					            @click="handleView(scope.row)"
 | 
				
			||||||
 | 
					            v-hasPermi="['mes:wm:rtvendor:query']"
 | 
				
			||||||
 | 
					            >{{ scope.row.rtCode }}</el-button
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="退货单名称" align="center" prop="rtName" />
 | 
					      <el-table-column label="退货单名称" align="center" prop="rtName" />
 | 
				
			||||||
      <el-table-column label="采购订单编号" align="center" prop="poCode" />
 | 
					      <el-table-column label="采购订单编号" align="center" prop="poCode" />
 | 
				
			||||||
      <el-table-column label="供应商编码" align="center" prop="vendorCode" />
 | 
					      <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">
 | 
					      <el-table-column label="退货日期" align="center" prop="rtDate" width="180">
 | 
				
			||||||
        <template slot-scope="scope">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <span>{{ parseTime(scope.row.rtDate, '{y}-{m}-{d}') }}</span>
 | 
					          <span>{{ parseTime(scope.row.rtDate, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
      <el-table-column label="单据状态" align="center" prop="status">
 | 
					      <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" />
 | 
					          <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </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">
 | 
					        <template slot-scope="scope">
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == 'PREPARE'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleExecute(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">执行退货</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.status == 'PREPARE'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleUpdate(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">修改</el-button>
 | 
					            icon="el-icon-video-play"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-delete" v-if="scope.row.status == 'PREPARE'"
 | 
					            v-if="scope.row.status == 'PREPARE'"
 | 
				
			||||||
            @click="handleDelete(scope.row)" v-hasPermi="['mes:wm:rtvendor:remove']">删除</el-button>
 | 
					            @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'"
 | 
					          <el-button
 | 
				
			||||||
            @click="handleWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">撤销</el-button>
 | 
					            size="mini"
 | 
				
			||||||
          <el-button size="mini" type="text" icon="el-icon-view" v-if="scope.row.status == 'CANCEL'"
 | 
					            type="text"
 | 
				
			||||||
            @click="handleLookWithdrawn(scope.row)" v-hasPermi="['mes:wm:rtvendor:edit']">查看撤销原因</el-button>
 | 
					            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>
 | 
					        </template>
 | 
				
			||||||
      </el-table-column>
 | 
					      </el-table-column>
 | 
				
			||||||
    </el-table>
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
 | 
					    <pagination
 | 
				
			||||||
      @pagination="getList" />
 | 
					      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>
 | 
					    <el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
 | 
				
			||||||
@@ -98,8 +224,13 @@ Name:"供应商退货父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="4">
 | 
					          <el-col :span="4">
 | 
				
			||||||
            <el-form-item label-width="80">
 | 
					            <el-form-item label-width="80">
 | 
				
			||||||
              <el-switch v-model="autoGenFlag" active-color="#13ce66" active-text="自动生成"
 | 
					              <el-switch
 | 
				
			||||||
                @change="handleAutoGenChange(autoGenFlag)" v-if="optType != 'view' && form.status == 'PREPARE'">
 | 
					                v-model="autoGenFlag"
 | 
				
			||||||
 | 
					                active-color="#13ce66"
 | 
				
			||||||
 | 
					                active-text="自动生成"
 | 
				
			||||||
 | 
					                @change="handleAutoGenChange(autoGenFlag)"
 | 
				
			||||||
 | 
					                v-if="optType != 'view' && form.status == 'PREPARE'"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-switch>
 | 
					              </el-switch>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -117,8 +248,16 @@ Name:"供应商退货父组件"
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="8">
 | 
					          <el-col :span="8">
 | 
				
			||||||
            <el-form-item label="供应商" prop="vendorName">
 | 
					            <el-form-item label="供应商" prop="vendorName">
 | 
				
			||||||
              <el-input v-model="form.vendorName" readonly="readonly" placeholder="请选择供应商">
 | 
					              <el-input
 | 
				
			||||||
                <el-button slot="append" @click="handleSelectVendor" icon="el-icon-search"></el-button>
 | 
					                v-model="form.vendorName"
 | 
				
			||||||
 | 
					                readonly="readonly"
 | 
				
			||||||
 | 
					                placeholder="请选择供应商"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-button
 | 
				
			||||||
 | 
					                  slot="append"
 | 
				
			||||||
 | 
					                  @click="handleSelectVendor"
 | 
				
			||||||
 | 
					                  icon="el-icon-search"
 | 
				
			||||||
 | 
					                ></el-button>
 | 
				
			||||||
              </el-input>
 | 
					              </el-input>
 | 
				
			||||||
              <VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
 | 
					              <VendorSelect ref="vendorSelect" @onSelected="onVendorSelected" />
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
@@ -132,16 +271,25 @@ Name:"供应商退货父组件"
 | 
				
			|||||||
        <el-row>
 | 
					        <el-row>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="退货日期" prop="rtDate">
 | 
					            <el-form-item label="退货日期" prop="rtDate">
 | 
				
			||||||
              <el-date-picker clearable v-model="form.rtDate" type="date" value-format="yyyy-MM-dd"
 | 
					              <el-date-picker
 | 
				
			||||||
                placeholder="请选择退货日期">
 | 
					                clearable
 | 
				
			||||||
 | 
					                v-model="form.rtDate"
 | 
				
			||||||
 | 
					                type="date"
 | 
				
			||||||
 | 
					                value-format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					                placeholder="请选择退货日期"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              </el-date-picker>
 | 
					              </el-date-picker>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-form-item label="单据状态" prop="status">
 | 
					            <el-form-item label="单据状态" prop="status">
 | 
				
			||||||
              <el-select v-model="form.status" disabled placeholder="请选择单据状态">
 | 
					              <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"
 | 
					                <el-option
 | 
				
			||||||
                  :value="dict.value"></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-select>
 | 
				
			||||||
            </el-form-item>
 | 
					            </el-form-item>
 | 
				
			||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
@@ -156,23 +304,46 @@ Name:"供应商退货父组件"
 | 
				
			|||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <el-divider v-if="form.rtId != null" content-position="center">物料信息</el-divider>
 | 
					      <el-divider v-if="form.rtId != null" content-position="center">物料信息</el-divider>
 | 
				
			||||||
      <el-card shadow="always" v-if="form.rtId != null" class="box-card">
 | 
					      <el-card shadow="always" v-if="form.rtId != null" class="box-card">
 | 
				
			||||||
        <Rtvendorline ref=line :rtId="form.rtId" :batchCode="form.batchCdoe" :vendorId="form.vendorId"
 | 
					        <Rtvendorline
 | 
				
			||||||
          :optType="optType">
 | 
					          ref="line"
 | 
				
			||||||
 | 
					          :rtId="form.rtId"
 | 
				
			||||||
 | 
					          :batchCode="form.batchCdoe"
 | 
				
			||||||
 | 
					          :vendorId="form.vendorId"
 | 
				
			||||||
 | 
					          :optType="optType"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
        </Rtvendorline>
 | 
					        </Rtvendorline>
 | 
				
			||||||
      </el-card>
 | 
					      </el-card>
 | 
				
			||||||
      <div slot="footer" class="dialog-footer">
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
        <el-button type="primary" @click="cancel" v-if="optType == 'view' || form.status != 'PREPARE'">返回</el-button>
 | 
					        <el-button
 | 
				
			||||||
        <el-button type="primary" @click="submitForm" v-if="form.status == 'PREPARE' && optType != 'view'">保
 | 
					          type="primary"
 | 
				
			||||||
          存</el-button>
 | 
					          @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>
 | 
					        <el-button @click="cancel">取 消</el-button>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <!-- 需求八 单据撤销 对话框 -->
 | 
					    <!-- 需求八 单据撤销 对话框 -->
 | 
				
			||||||
    <el-dialog title="单据撤销" :visible.sync="WithdrawnFlag" width="30%">
 | 
					    <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-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-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <span slot="footer" class="dialog-footer">
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
@@ -194,14 +365,22 @@ Name:"供应商退货父组件"
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { listRtvendor, getRtvendor, delRtvendor, addRtvendor, updateRtvendor, execute, cancelFn } from "@/api/mes/wm/rtvendor";
 | 
					import {
 | 
				
			||||||
import { genCode } from "@/api/system/autocode/rule"
 | 
					  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 VendorSelect from "@/components/vendorSelect/single.vue";
 | 
				
			||||||
import Rtvendorline from "./line.vue"
 | 
					import Rtvendorline from "./line.vue";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "Rtvendor",
 | 
					  name: "Rtvendor",
 | 
				
			||||||
  components: { VendorSelect, Rtvendorline },
 | 
					  components: { VendorSelect, Rtvendorline },
 | 
				
			||||||
  dicts: ['mes_order_status'],
 | 
					  dicts: ["mes_order_status"],
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      //自动生成编码
 | 
					      //自动生成编码
 | 
				
			||||||
@@ -239,41 +418,34 @@ export default {
 | 
				
			|||||||
        rtDate: null,
 | 
					        rtDate: null,
 | 
				
			||||||
        status: null,
 | 
					        status: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					            dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        rtCode: [
 | 
					        rtCode: [{ required: true, message: "退货单编号不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "退货单编号不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        // rtName: [
 | 
					        // rtName: [
 | 
				
			||||||
        //   { required: true, message: "退货单名称不能为空", trigger: "blur" }
 | 
					        //   { required: true, message: "退货单名称不能为空", trigger: "blur" }
 | 
				
			||||||
        // ],
 | 
					        // ],
 | 
				
			||||||
        vendorName: [
 | 
					        vendorName: [{ required: true, message: "供应商不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "供应商不能为空", trigger: "blur" }
 | 
					        rtDate: [{ required: true, message: "退货日期不能为空", trigger: "blur" }],
 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        rtDate: [
 | 
					 | 
				
			||||||
          { required: true, message: "退货日期不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 单据撤销 对话框 开关
 | 
					      // 单据撤销 对话框 开关
 | 
				
			||||||
      WithdrawnFlag: false,
 | 
					      WithdrawnFlag: false,
 | 
				
			||||||
      // 单据撤销 对话框 表单参数
 | 
					      // 单据撤销 对话框 表单参数
 | 
				
			||||||
      WithdrawnForm: {
 | 
					      WithdrawnForm: {
 | 
				
			||||||
        rtId: null,
 | 
					        rtId: null,
 | 
				
			||||||
        cancelRemark: null
 | 
					        cancelRemark: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 撤销单 表单校验
 | 
					      // 撤销单 表单校验
 | 
				
			||||||
      WithdrawnRules: {
 | 
					      WithdrawnRules: {
 | 
				
			||||||
        cancelRemark: [
 | 
					        cancelRemark: [{ required: true, message: "撤销原因不能为空", trigger: "blur" }],
 | 
				
			||||||
          { required: true, message: "撤销原因不能为空", trigger: "blur" }
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // 查看撤销原因 以及 开关
 | 
					      // 查看撤销原因 以及 开关
 | 
				
			||||||
      LookWithdrawnFlag: false,
 | 
					      LookWithdrawnFlag: false,
 | 
				
			||||||
      LookWithdrawn: null,
 | 
					      LookWithdrawn: null,
 | 
				
			||||||
      // 监听 路由 参数 的 变量
 | 
					      // 监听 路由 参数 的 变量
 | 
				
			||||||
      parameterValue: ''
 | 
					      parameterValue: "",
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
@@ -285,7 +457,7 @@ export default {
 | 
				
			|||||||
    /** 查询供应商退货列表 */
 | 
					    /** 查询供应商退货列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listRtvendor(this.queryParams).then(response => {
 | 
					      listRtvendor(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
 | 
				
			||||||
        this.rtvendorList = response.rows;
 | 
					        this.rtvendorList = response.rows;
 | 
				
			||||||
        this.total = response.total;
 | 
					        this.total = response.total;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
@@ -313,8 +485,9 @@ export default {
 | 
				
			|||||||
        createBy: null,
 | 
					        createBy: null,
 | 
				
			||||||
        createTime: null,
 | 
					        createTime: null,
 | 
				
			||||||
        updateBy: null,
 | 
					        updateBy: null,
 | 
				
			||||||
        updateTime: null
 | 
					        updateTime: null,
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					       this.dateRange = [];
 | 
				
			||||||
      this.resetForm("form");
 | 
					      this.resetForm("form");
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 搜索按钮操作 */
 | 
					    /** 搜索按钮操作 */
 | 
				
			||||||
@@ -327,7 +500,7 @@ export default {
 | 
				
			|||||||
      if (this.parameterValue) {
 | 
					      if (this.parameterValue) {
 | 
				
			||||||
        this.parameterValue = null;
 | 
					        this.parameterValue = null;
 | 
				
			||||||
        this.resetForm("queryForm");
 | 
					        this.resetForm("queryForm");
 | 
				
			||||||
        this.$router.push('/mes/wm/rtvendor')
 | 
					        this.$router.push("/mes/wm/rtvendor");
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        this.resetForm("queryForm");
 | 
					        this.resetForm("queryForm");
 | 
				
			||||||
        this.handleQuery();
 | 
					        this.handleQuery();
 | 
				
			||||||
@@ -335,9 +508,9 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 多选框选中数据
 | 
					    // 多选框选中数据
 | 
				
			||||||
    handleSelectionChange(selection) {
 | 
					    handleSelectionChange(selection) {
 | 
				
			||||||
      this.ids = selection.map(item => item.rtId)
 | 
					      this.ids = selection.map((item) => item.rtId);
 | 
				
			||||||
      this.single = selection.length !== 1
 | 
					      this.single = selection.length !== 1;
 | 
				
			||||||
      this.multiple = !selection.length
 | 
					      this.multiple = !selection.length;
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 新增按钮操作 */
 | 
					    /** 新增按钮操作 */
 | 
				
			||||||
    handleAdd() {
 | 
					    handleAdd() {
 | 
				
			||||||
@@ -349,8 +522,8 @@ export default {
 | 
				
			|||||||
    // 查询明细按钮操作
 | 
					    // 查询明细按钮操作
 | 
				
			||||||
    handleView(row) {
 | 
					    handleView(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const rtIds = row.rtId
 | 
					      const rtIds = row.rtId;
 | 
				
			||||||
      getRtvendor(rtIds).then(response => {
 | 
					      getRtvendor(rtIds).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
        this.title = "查看退货单信息";
 | 
					        this.title = "查看退货单信息";
 | 
				
			||||||
@@ -360,8 +533,8 @@ export default {
 | 
				
			|||||||
    /** 修改按钮操作 */
 | 
					    /** 修改按钮操作 */
 | 
				
			||||||
    handleUpdate(row) {
 | 
					    handleUpdate(row) {
 | 
				
			||||||
      this.reset();
 | 
					      this.reset();
 | 
				
			||||||
      const rtId = row.rtId || this.ids
 | 
					      const rtId = row.rtId || this.ids;
 | 
				
			||||||
      getRtvendor(rtId).then(response => {
 | 
					      getRtvendor(rtId).then((response) => {
 | 
				
			||||||
        this.form = response.data;
 | 
					        this.form = response.data;
 | 
				
			||||||
        this.open = true;
 | 
					        this.open = true;
 | 
				
			||||||
        this.title = "修改供应商退货";
 | 
					        this.title = "修改供应商退货";
 | 
				
			||||||
@@ -370,16 +543,16 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 提交按钮 */
 | 
					    /** 提交按钮 */
 | 
				
			||||||
    submitForm() {
 | 
					    submitForm() {
 | 
				
			||||||
      this.$refs["form"].validate(valid => {
 | 
					      this.$refs["form"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (this.form.rtId != null) {
 | 
					          if (this.form.rtId != null) {
 | 
				
			||||||
            updateRtvendor(this.form).then(response => {
 | 
					            updateRtvendor(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("修改成功");
 | 
					              this.$modal.msgSuccess("修改成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            addRtvendor(this.form).then(response => {
 | 
					            addRtvendor(this.form).then((response) => {
 | 
				
			||||||
              this.$modal.msgSuccess("新增成功");
 | 
					              this.$modal.msgSuccess("新增成功");
 | 
				
			||||||
              this.open = false;
 | 
					              this.open = false;
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
@@ -391,36 +564,50 @@ export default {
 | 
				
			|||||||
    //确认单据
 | 
					    //确认单据
 | 
				
			||||||
    doconfirm() {
 | 
					    doconfirm() {
 | 
				
			||||||
      let that = this;
 | 
					      let that = this;
 | 
				
			||||||
      this.$modal.confirm('是否完成供应商退货编制?【完成后将不能更改】').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
        that.form.status = 'CONFIRMED';
 | 
					        .confirm("是否完成供应商退货编制?【完成后将不能更改】")
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
 | 
					          that.form.status = "CONFIRMED";
 | 
				
			||||||
          that.submitForm();
 | 
					          that.submitForm();
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //执行退货
 | 
					    //执行退货
 | 
				
			||||||
    handleExecute(row) {
 | 
					    handleExecute(row) {
 | 
				
			||||||
      const rtIds = row.rtId || this.ids;
 | 
					      const rtIds = row.rtId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('确认执行退货?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
        return execute(rtIds)//执行入库
 | 
					        .confirm("确认执行退货?")
 | 
				
			||||||
      }).then(() => {
 | 
					        .then(function () {
 | 
				
			||||||
 | 
					          return execute(rtIds); //执行入库
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("退货成功");
 | 
					          this.$modal.msgSuccess("退货成功");
 | 
				
			||||||
      }).catch(() => { });
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 删除按钮操作 */
 | 
					    /** 删除按钮操作 */
 | 
				
			||||||
    handleDelete(row) {
 | 
					    handleDelete(row) {
 | 
				
			||||||
      const rtIds = row.rtId || this.ids;
 | 
					      const rtIds = row.rtId || this.ids;
 | 
				
			||||||
      this.$modal.confirm('是否确认删除供应商退货编号为"' + rtIds + '"的数据项?').then(function () {
 | 
					      this.$modal
 | 
				
			||||||
 | 
					        .confirm('是否确认删除供应商退货编号为"' + rtIds + '"的数据项?')
 | 
				
			||||||
 | 
					        .then(function () {
 | 
				
			||||||
          return delRtvendor(rtIds);
 | 
					          return delRtvendor(rtIds);
 | 
				
			||||||
      }).then(() => {
 | 
					        })
 | 
				
			||||||
 | 
					        .then(() => {
 | 
				
			||||||
          this.getList();
 | 
					          this.getList();
 | 
				
			||||||
          this.$modal.msgSuccess("删除成功");
 | 
					          this.$modal.msgSuccess("删除成功");
 | 
				
			||||||
      }).catch(() => { });
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      this.download('mes/wm/rtvendor/export', {
 | 
					      this.download(
 | 
				
			||||||
        ...this.queryParams
 | 
					        "mes/wm/rtvendor/export",
 | 
				
			||||||
      }, `供应商退货数据.xlsx`)
 | 
					        {
 | 
				
			||||||
 | 
					          ...this.queryParams,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        `供应商退货数据.xlsx`
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    //供应商选择
 | 
					    //供应商选择
 | 
				
			||||||
    handleSelectVendor() {
 | 
					    handleSelectVendor() {
 | 
				
			||||||
@@ -438,7 +625,7 @@ export default {
 | 
				
			|||||||
    //自动生成编码
 | 
					    //自动生成编码
 | 
				
			||||||
    handleAutoGenChange(autoGenFlag) {
 | 
					    handleAutoGenChange(autoGenFlag) {
 | 
				
			||||||
      if (autoGenFlag) {
 | 
					      if (autoGenFlag) {
 | 
				
			||||||
        genCode('WM_RTVENDOR_CODE').then(response => {
 | 
					        genCode("WM_RTVENDOR_CODE").then((response) => {
 | 
				
			||||||
          this.form.rtCode = response;
 | 
					          this.form.rtCode = response;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
@@ -453,20 +640,22 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    // 撤销原因 提交
 | 
					    // 撤销原因 提交
 | 
				
			||||||
    handleWithdrawnSubmit(formName) {
 | 
					    handleWithdrawnSubmit(formName) {
 | 
				
			||||||
      this.$refs['WithdrawnForm'].validate((valid) => {
 | 
					      this.$refs["WithdrawnForm"].validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          cancelFn(this.WithdrawnForm).then((res) => {
 | 
					          cancelFn(this.WithdrawnForm)
 | 
				
			||||||
 | 
					            .then((res) => {
 | 
				
			||||||
              console.log(res);
 | 
					              console.log(res);
 | 
				
			||||||
              if (res.code == 200) {
 | 
					              if (res.code == 200) {
 | 
				
			||||||
                this.$modal.msgSuccess(res.msg);
 | 
					                this.$modal.msgSuccess(res.msg);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
          }).finally(() => {
 | 
					            })
 | 
				
			||||||
 | 
					            .finally(() => {
 | 
				
			||||||
              this.WithdrawnFlag = false;
 | 
					              this.WithdrawnFlag = false;
 | 
				
			||||||
            this.$refs['WithdrawnForm'].resetFields();
 | 
					              this.$refs["WithdrawnForm"].resetFields();
 | 
				
			||||||
              this.getList();
 | 
					              this.getList();
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          console.log('error submit!!');
 | 
					          console.log("error submit!!");
 | 
				
			||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
@@ -485,17 +674,17 @@ export default {
 | 
				
			|||||||
      if (params) {
 | 
					      if (params) {
 | 
				
			||||||
        this.parameterValue = params;
 | 
					        this.parameterValue = params;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
    // 监听$route的变化,以便在用户导航到具有不同查询参数的新路由时更新parameterValue
 | 
					    // 监听$route的变化,以便在用户导航到具有不同查询参数的新路由时更新parameterValue
 | 
				
			||||||
    'parameterValue': function (to, from) {
 | 
					    parameterValue: function (to, from) {
 | 
				
			||||||
      console.log(to, from);
 | 
					      console.log(to, from);
 | 
				
			||||||
      this.queryParams.rtCode = to;
 | 
					      this.queryParams.rtCode = to;
 | 
				
			||||||
      setTimeout(() => {
 | 
					      setTimeout(() => {
 | 
				
			||||||
        this.handleQuery();
 | 
					        this.handleQuery();
 | 
				
			||||||
      })
 | 
					      });
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,6 +42,17 @@
 | 
				
			|||||||
          clearable
 | 
					          clearable
 | 
				
			||||||
          @keyup.enter.native="handleQuery"
 | 
					          @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-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>
 | 
				
			||||||
@@ -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,      },
 | 
					        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: {},
 | 
					      form: {},
 | 
				
			||||||
 | 
					            dateRange: [],
 | 
				
			||||||
      // 表单校验
 | 
					      // 表单校验
 | 
				
			||||||
      rules: {
 | 
					      rules: {
 | 
				
			||||||
        transferCode: [
 | 
					        transferCode: [
 | 
				
			||||||
@@ -356,7 +368,7 @@ export default {
 | 
				
			|||||||
    /** 查询转移单列表 */
 | 
					    /** 查询转移单列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listTransfer(this.queryParams).then(response => {
 | 
					      listTransfer(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
 | 
				
			||||||
        this.transferList = response.rows;
 | 
					        this.transferList = response.rows;
 | 
				
			||||||
        this.total = response.total;
 | 
					        this.total = response.total;
 | 
				
			||||||
        this.loading = false;
 | 
					        this.loading = false;
 | 
				
			||||||
@@ -411,6 +423,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					      this.resetForm("queryForm");
 | 
				
			||||||
      this.handleQuery();
 | 
					      this.handleQuery();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,11 +88,13 @@
 | 
				
			|||||||
          </el-form-item>
 | 
					          </el-form-item>
 | 
				
			||||||
          <el-form-item label="库存有效期" prop="expireDate">
 | 
					          <el-form-item label="库存有效期" prop="expireDate">
 | 
				
			||||||
            <el-date-picker
 | 
					            <el-date-picker
 | 
				
			||||||
              clearable
 | 
					              v-model="dateRange"
 | 
				
			||||||
              v-model="queryParams.expireDate"
 | 
					              style="width: 240px"
 | 
				
			||||||
              type="date"
 | 
					 | 
				
			||||||
              value-format="yyyy-MM-dd"
 | 
					              value-format="yyyy-MM-dd"
 | 
				
			||||||
              placeholder="请选择库存有效期"
 | 
					              type="daterange"
 | 
				
			||||||
 | 
					              range-separator="-"
 | 
				
			||||||
 | 
					              start-placeholder="开始日期"
 | 
				
			||||||
 | 
					              end-placeholder="结束日期"
 | 
				
			||||||
            ></el-date-picker>
 | 
					            ></el-date-picker>
 | 
				
			||||||
          </el-form-item>
 | 
					          </el-form-item>
 | 
				
			||||||
          <el-form-item>
 | 
					          <el-form-item>
 | 
				
			||||||
@@ -140,12 +142,7 @@
 | 
				
			|||||||
          :data="wmstockList"
 | 
					          :data="wmstockList"
 | 
				
			||||||
          @selection-change="handleSelectionChange"
 | 
					          @selection-change="handleSelectionChange"
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column type="selection" width="55" align="center" fixed="left" />
 | 
				
			||||||
            type="selection"
 | 
					 | 
				
			||||||
            width="55"
 | 
					 | 
				
			||||||
            align="center"
 | 
					 | 
				
			||||||
            fixed="left"
 | 
					 | 
				
			||||||
          />
 | 
					 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column
 | 
				
			||||||
            label="产品物料编码"
 | 
					            label="产品物料编码"
 | 
				
			||||||
            width="120px"
 | 
					            width="120px"
 | 
				
			||||||
@@ -165,11 +162,7 @@
 | 
				
			|||||||
            prop="specification"
 | 
					            prop="specification"
 | 
				
			||||||
            :show-overflow-tooltip="true"
 | 
					            :show-overflow-tooltip="true"
 | 
				
			||||||
          />
 | 
					          />
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column label="在库重量" align="center" prop="quantityOnhand" />
 | 
				
			||||||
            label="在库重量"
 | 
					 | 
				
			||||||
            align="center"
 | 
					 | 
				
			||||||
            prop="quantityOnhand"
 | 
					 | 
				
			||||||
          />
 | 
					 | 
				
			||||||
          <el-table-column label="单位" align="center" prop="unitOfMeasure" />
 | 
					          <el-table-column label="单位" align="center" prop="unitOfMeasure" />
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column
 | 
				
			||||||
            label="入库批次号"
 | 
					            label="入库批次号"
 | 
				
			||||||
@@ -200,17 +193,8 @@
 | 
				
			|||||||
            align="center"
 | 
					            align="center"
 | 
				
			||||||
            prop="vendorNick"
 | 
					            prop="vendorNick"
 | 
				
			||||||
          />
 | 
					          />
 | 
				
			||||||
          <el-table-column
 | 
					          <el-table-column label="生产工单" width="100px" prop="workorderCode" />
 | 
				
			||||||
            label="生产工单"
 | 
					          <el-table-column label="入库日期" align="center" prop="recptDate" width="120">
 | 
				
			||||||
            width="100px"
 | 
					 | 
				
			||||||
            prop="workorderCode"
 | 
					 | 
				
			||||||
          />
 | 
					 | 
				
			||||||
          <el-table-column
 | 
					 | 
				
			||||||
            label="入库日期"
 | 
					 | 
				
			||||||
            align="center"
 | 
					 | 
				
			||||||
            prop="recptDate"
 | 
					 | 
				
			||||||
            width="120"
 | 
					 | 
				
			||||||
          >
 | 
					 | 
				
			||||||
            <template slot-scope="scope">
 | 
					            <template slot-scope="scope">
 | 
				
			||||||
              <span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
 | 
					              <span>{{ parseTime(scope.row.recptDate, "{y}-{m}-{d}") }}</span>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
@@ -323,6 +307,7 @@ export default {
 | 
				
			|||||||
        workorderCode: null,
 | 
					        workorderCode: null,
 | 
				
			||||||
        expireDate: null,
 | 
					        expireDate: null,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      dateRange: [],
 | 
				
			||||||
      // 表单参数
 | 
					      // 表单参数
 | 
				
			||||||
      form: {},
 | 
					      form: {},
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
@@ -370,11 +355,13 @@ export default {
 | 
				
			|||||||
    /** 查询库存记录列表 */
 | 
					    /** 查询库存记录列表 */
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      this.loading = true;
 | 
					      this.loading = true;
 | 
				
			||||||
      listWmstock(this.queryParams).then((response) => {
 | 
					      listWmstock(this.addDateRange(this.queryParams, this.dateRange)).then(
 | 
				
			||||||
 | 
					        (response) => {
 | 
				
			||||||
          this.wmstockList = response.rows;
 | 
					          this.wmstockList = response.rows;
 | 
				
			||||||
          this.total = response.total;
 | 
					          this.total = response.total;
 | 
				
			||||||
          this.loading = false;
 | 
					          this.loading = false;
 | 
				
			||||||
      });
 | 
					        }
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 查询分类下拉树结构 */
 | 
					    /** 查询分类下拉树结构 */
 | 
				
			||||||
    getTreeselect() {
 | 
					    getTreeselect() {
 | 
				
			||||||
@@ -399,6 +386,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 重置按钮操作 */
 | 
					    /** 重置按钮操作 */
 | 
				
			||||||
    resetQuery() {
 | 
					    resetQuery() {
 | 
				
			||||||
 | 
					      this.dateRange = [];
 | 
				
			||||||
      this.resetForm("queryForm");
 | 
					      this.resetForm("queryForm");
 | 
				
			||||||
      this.handleQuery();
 | 
					      this.handleQuery();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,14 +35,14 @@ module.exports = {
 | 
				
			|||||||
  // webpack-dev-server 相关配置
 | 
					  // webpack-dev-server 相关配置
 | 
				
			||||||
  devServer: {
 | 
					  devServer: {
 | 
				
			||||||
    // ip 变化
 | 
					    // ip 变化
 | 
				
			||||||
    host: "172.16.10.34",
 | 
					    host: "0.0.0.0",
 | 
				
			||||||
    port: port,
 | 
					    port: port,
 | 
				
			||||||
    open: true,
 | 
					    open: true,
 | 
				
			||||||
    proxy: {
 | 
					    proxy: {
 | 
				
			||||||
      // detail: https://cli.vuejs.org/config/#devserver-proxy
 | 
					      // detail: https://cli.vuejs.org/config/#devserver-proxy
 | 
				
			||||||
      [process.env.VUE_APP_BASE_API]: {
 | 
					      [process.env.VUE_APP_BASE_API]: {
 | 
				
			||||||
        // target: `http://172.16.10.97:8002`,
 | 
					        // target: `http://172.16.10.97:8002`,
 | 
				
			||||||
        target: `http://116.204.107.54:8002`,
 | 
					        target: `http://172.16.10.97:8002`,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        changeOrigin: true,
 | 
					        changeOrigin: true,
 | 
				
			||||||
        pathRewrite: {
 | 
					        pathRewrite: {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user