Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
52d98f55
authored
Jun 03, 2021
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
ad603c9d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
5 deletions
src/views/List/inquireDetail.vue
view/app.bb808fb84e71c01f8d5f.js → view/app.1527feda47363117e1f3.js
view/index.html
view/js/15.js
src/views/List/inquireDetail.vue
View file @
52d98f55
...
@@ -696,8 +696,7 @@
...
@@ -696,8 +696,7 @@
return
;
return
;
}
}
if
(
this
.
multipleSelection
[
0
].
status
==
1
||
this
.
multipleSelection
[
0
].
status
==
3
||
this
.
multipleSelection
[
0
]
if
(
this
.
multipleSelection
[
0
].
status
==
1
||
this
.
multipleSelection
[
0
].
status
==
3
)
{
.
status
==
5
)
{
for
(
var
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
arr
.
push
(
this
.
multipleSelection
[
i
][
'id'
])
arr
.
push
(
this
.
multipleSelection
[
i
][
'id'
])
...
...
view/app.
bb808fb84e71c01f8d5f
.js
→
view/app.
1527feda47363117e1f3
.js
View file @
52d98f55
File moved
view/index.html
View file @
52d98f55
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"icon"
href=
"http://yunxin.liexindev.net/favicon.ico"
>
<link
rel=
"icon"
href=
"http://yunxin.liexindev.net/favicon.ico"
>
<title>
cloudsystem
</title>
<title>
cloudsystem
</title>
<link
href=
"http://yunxin.liexindev.net/js/0.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/1.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/10.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/11.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/12.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/13.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/14.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/15.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/16.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/17.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/18.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/19.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/2.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/20.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/21.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/22.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/23.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/24.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/25.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/26.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/27.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/28.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/3.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/4.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/5.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/6.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/7.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/8.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/9.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/app.
bb808fb84e71c01f8d5f
.js"
rel=
"preload"
as=
"script"
></head>
<link
href=
"http://yunxin.liexindev.net/js/0.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/1.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/10.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/11.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/12.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/13.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/14.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/15.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/16.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/17.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/18.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/19.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/2.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/20.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/21.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/22.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/23.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/24.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/25.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/26.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/27.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/28.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/3.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/4.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/5.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/6.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/7.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/8.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/9.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/app.
1527feda47363117e1f3
.js"
rel=
"preload"
as=
"script"
></head>
<body>
<body>
<noscript>
<noscript>
<strong>
网络异常,请稍后加载
</strong>
<strong>
网络异常,请稍后加载
</strong>
</noscript>
</noscript>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
<!-- built files will be auto injected -->
<script
type=
"text/javascript"
src=
"http://yunxin.liexindev.net/app.
bb808fb84e71c01f8d5f
.js"
></script></body>
<script
type=
"text/javascript"
src=
"http://yunxin.liexindev.net/app.
1527feda47363117e1f3
.js"
></script></body>
</html>
</html>
view/js/15.js
View file @
52d98f55
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _formate = __webpack_require__(/*! ../../filters/formate.js */ \"./src/filters/formate.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default).use(_tooltip2.default); // .use(Loading);\n\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"InquireDetail\",\n\n data() {\n return {\n currentDataId: 0,\n active: 0,\n total: 0,\n limit: 10,\n page: 1,\n multipleSelection: [],\n quote_info: {},\n inquiry_info: {},\n quote_list: [],\n title: '新增',\n isModify: false,\n tableData: [],\n historyList: [],\n submitState: 0,\n ruleForm: {\n inquiry_id: '',\n inquiry_sn: '',\n inquiry_items_id: '',\n quote_id: '',\n goods_name: '',\n quote_number: '',\n currency: '1',\n batch: '',\n mpq: '',\n price_other: '',\n unit: '',\n brand: '',\n brand_s: '',\n price_origin: '',\n tax_rate: '13%',\n delivery_time: '',\n delivery_time_val: '',\n delivery_time_unit: '天',\n moq: '',\n expire_time: '',\n remark: ''\n },\n rules: {\n goods_name: [{\n required: true,\n message: '请输入报价型号',\n trigger: 'blur'\n }],\n brand_s: [{\n required: true,\n message: '请选择品牌',\n trigger: 'blur'\n }],\n quote_number: [{\n required: true,\n message: '请输入报价数量',\n trigger: 'blur'\n }],\n currency: [{\n required: true,\n message: '请选择币种',\n trigger: 'blur'\n }],\n batch: [{\n required: true,\n message: '请输入批次',\n trigger: 'blur'\n }],\n brand: [{\n required: true,\n message: '请选择报价品牌'\n }],\n price_origin: [{\n required: true,\n message: '请输入价格',\n trigger: 'blur'\n }],\n delivery_time_val: [{\n required: true,\n message: '请输入货期',\n trigger: 'blur'\n }],\n expire_time: [{\n required: true,\n message: '请输入报价有效期',\n trigger: 'blur'\n }]\n },\n dialogVisible: false,\n brandList: [],\n textArr: ['匹配库存', '历史报价']\n };\n },\n\n created() {\n this.getData();\n },\n\n watch: {\n $route(to, from) {\n if (to.path == from.path) {\n this.getData();\n }\n }\n\n },\n methods: {\n getData() {\n this.$http('get', \"/api/inquiry/detail\", {\n inquiry_item_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.inquiry_info = res.data.inquiry_info;\n this.quote_list = res.data.quote_list;\n this.ruleForm.inquiry_sn = res.data.inquiry_info.inquiry_sn;\n this.ruleForm.inquiry_id = res.data.inquiry_info.inquiry_id;\n this.ruleForm.inquiry_items_id = res.data.inquiry_info.id;\n this.getSkulist();\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n getSkulist() {\n console.log('库存匹配');\n this.$http('get', \"/api/sku/list\", {\n brand_id: this.inquiry_info.brand_id,\n goods_name: this.inquiry_info.goods_name,\n 'goods_status/condition': 1,\n goods_status: 1\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n var arr_ = this.tableData,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].goods_id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n checkBind(ids) {\n this.$http('get', \"/api/quote/checkpinlist\", {\n inquiry_items_id: this.$route.query.id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_ids: ids\n }).then(res => {\n if (res.err_code === 0) {\n if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {\n var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON.stringify(this.tableData));\n\n for (var i = 0; i < arr_.length; i++) {\n var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id);\n\n if (res.data.bind_ids.indexOf(str_) != -1) {\n if (this.active == 1) {\n arr_[i].disabled = true;\n this.historyList = arr_;\n } else {\n arr_[i].disabled = true;\n this.tableData = arr_;\n }\n } else {\n if (this.active == 1) {\n arr_[i].disabled = false;\n this.historyList = arr_;\n } else {\n arr_[i].disabled = false;\n this.tableData = arr_;\n }\n }\n }\n }\n }\n });\n },\n\n getHistory() {\n console.log('历史报价');\n this.$http('get', \"/api/quote/history\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.inquiry_info.goods_name,\n brand_name: this.inquiry_info.brand_name,\n inquiry_items_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.total = res.data.total;\n this.historyList = res.data.list || [];\n var arr_ = this.historyList,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getHistory();\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n tab(index) {\n this.active = index;\n console.log(this.active);\n this.page = 1;\n this.$forceUpdate();\n\n if (index == 1) {\n this.getHistory();\n } else {\n this.getSkulist();\n }\n },\n\n dateFormat(row, column) {\n let date = row.create_time;\n return (0, _formate.dateTimeFormate)(date);\n },\n\n keyup(val) {\n if (this.ruleForm.delivery_time_unit == '天') {\n if (val >= 6) {\n this.ruleForm.delivery_time_val = 6;\n }\n\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n } else if (this.ruleForm.delivery_time_unit == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n }\n },\n\n unitChange(val) {\n if (val == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n } else {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n }\n },\n\n currentChange(val) {\n if (val == 1) {\n this.ruleForm.tax_rate = '13%';\n } else if (val == 2) {\n this.ruleForm.tax_rate = '0%';\n }\n },\n\n submitForm(formName) {\n this.$refs[formName].validate(valid => {\n if (this.submitState) {\n return;\n }\n\n if (valid) {\n // let loadingInstance = Loading.service({\n // background: 'rgba(0, 0, 0, 0)'\n // });\n this.submitState = 1;\n let submitData_ = JSON.parse(JSON.stringify(this.ruleForm));\n\n if (submitData_.tax_rate == '13%') {\n submitData_.tax_rate = 0.13;\n } else {\n submitData_.tax_rate = 0;\n }\n\n this.$http('post', \"/api/quote/save\", submitData_).then(res => {\n if (res.err_code == 0) {\n //this.$message('操作成功');\n this.$http('post', \"/api/quote/pin\", {\n inquiry_items_id: this.ruleForm.inquiry_items_id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_id: this.currentDataId\n }).then(res => {\n if (res.err_code == 0) {} else {// this.$message(res.err_msg);\n }\n\n this.$message('操作成功');\n this.getData();\n\n if (this.active == 1) {//历史报价\n //this.getHistory()\n } else {\n //库存匹配\n this.getSkulist();\n }\n\n this.dialogVisible = false; // setTimeout(() => {\n // window.location.reload();\n // }, 2000)\n // loadingInstance.close();\n\n this.submitState = 0;\n });\n } else {\n this.$message(res.err_msg);\n this.submitState = 0; //loadingInstance.close();\n }\n }).catch(err => {\n this.submitState = 0; //loadingInstance.close();\n });\n } else {\n console.log(this.ruleForm.delivery_time);\n return false;\n }\n });\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.ruleForm.brand,\n type: 2\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = []; //this.ruleForm.brand = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n handleSelectBrandName(item) {\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = item.brand_id;\n brand_ss[0].brand_name = item.value;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n },\n\n added() {\n this.title = '新增';\n this.dialogVisible = true;\n this.isModify = false;\n this.ruleForm.brand = '';\n this.ruleForm.tax_rate = '13%';\n this.ruleForm.moq = '';\n this.ruleForm.mpq = '';\n this.ruleForm.price_other = '';\n this.ruleForm.quote_id = '';\n this.$nextTick(() => {\n this.$refs['ruleForm'].resetFields();\n });\n },\n\n modify() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection.length > 1) {\n this.$message(\"请选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3
|| this.multipleSelection[0].status == 5
) {\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.title = '修改';\n this.dialogVisible = true;\n this.ruleForm.quote_id = arr.join(\",\");\n this.isModify = true;\n this.$http('get', \"/api/quote/getinfo\", {\n id: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n console.log(res.data.quote_info.tax_rate);\n this.ruleForm.tax_rate = Number(res.data.quote_info.tax_rate) * 100 + '%';\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n this.$message(res.err_msg);\n }\n });\n } else {\n this.$message(\"该订单不可修改\");\n return;\n }\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/quote/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n }).catch(() => {});\n },\n\n handle(index, row) {\n console.log(row);\n\n if (row.disabled) {\n this.$message('已绑定,不能重复操作');\n return;\n }\n\n if (this.active == 1) {\n this.currentDataId = row.id;\n } else {\n this.currentDataId = row.goods_id;\n }\n\n this.title = this.active == 1 ? '确认-历史报价' : '确认-匹配库存';\n this.dialogVisible = true;\n this.ruleForm.quote_id = '';\n this.isModify = true;\n\n if (this.active != 1) {\n //匹配库存 不请求接口\n this.$http('get', \"/api/quote/gettransinfoforsku\", {\n goods_id: row.goods_id,\n inquiry_items_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n var datap_ = res.data.trans_to_quote_info;\n this.ruleForm.goods_name = datap_.goods_name;\n this.ruleForm.batch = datap_.batch;\n this.ruleForm.price_origin = datap_.price_origin;\n this.ruleForm.brand = datap_.brand_name;\n let brand_ssaa = [{\n brand_id: datap_.brand_id,\n brand_name: datap_.brand_name\n }];\n this.ruleForm.brand_s = JSON.stringify(brand_ssaa);\n this.ruleForm.moq = datap_.moq;\n this.ruleForm.mpq = datap_.mpq;\n this.ruleForm.quote_number = datap_.quote_number;\n } else {\n this.$message(res.err_msg);\n }\n });\n } else {\n this.$http('get', \"/api/quote/getinfo\", {\n id: row.id\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n this.ruleForm.tax_rate = res.data.quote_info.tax_rate;\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n this.$message(res.err_msg);\n }\n });\n }\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/inquireDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _formate = __webpack_require__(/*! ../../filters/formate.js */ \"./src/filters/formate.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default).use(_tooltip2.default); // .use(Loading);\n\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"InquireDetail\",\n\n data() {\n return {\n currentDataId: 0,\n active: 0,\n total: 0,\n limit: 10,\n page: 1,\n multipleSelection: [],\n quote_info: {},\n inquiry_info: {},\n quote_list: [],\n title: '新增',\n isModify: false,\n tableData: [],\n historyList: [],\n submitState: 0,\n ruleForm: {\n inquiry_id: '',\n inquiry_sn: '',\n inquiry_items_id: '',\n quote_id: '',\n goods_name: '',\n quote_number: '',\n currency: '1',\n batch: '',\n mpq: '',\n price_other: '',\n unit: '',\n brand: '',\n brand_s: '',\n price_origin: '',\n tax_rate: '13%',\n delivery_time: '',\n delivery_time_val: '',\n delivery_time_unit: '天',\n moq: '',\n expire_time: '',\n remark: ''\n },\n rules: {\n goods_name: [{\n required: true,\n message: '请输入报价型号',\n trigger: 'blur'\n }],\n brand_s: [{\n required: true,\n message: '请选择品牌',\n trigger: 'blur'\n }],\n quote_number: [{\n required: true,\n message: '请输入报价数量',\n trigger: 'blur'\n }],\n currency: [{\n required: true,\n message: '请选择币种',\n trigger: 'blur'\n }],\n batch: [{\n required: true,\n message: '请输入批次',\n trigger: 'blur'\n }],\n brand: [{\n required: true,\n message: '请选择报价品牌'\n }],\n price_origin: [{\n required: true,\n message: '请输入价格',\n trigger: 'blur'\n }],\n delivery_time_val: [{\n required: true,\n message: '请输入货期',\n trigger: 'blur'\n }],\n expire_time: [{\n required: true,\n message: '请输入报价有效期',\n trigger: 'blur'\n }]\n },\n dialogVisible: false,\n brandList: [],\n textArr: ['匹配库存', '历史报价']\n };\n },\n\n created() {\n this.getData();\n },\n\n watch: {\n $route(to, from) {\n if (to.path == from.path) {\n this.getData();\n }\n }\n\n },\n methods: {\n getData() {\n this.$http('get', \"/api/inquiry/detail\", {\n inquiry_item_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.inquiry_info = res.data.inquiry_info;\n this.quote_list = res.data.quote_list;\n this.ruleForm.inquiry_sn = res.data.inquiry_info.inquiry_sn;\n this.ruleForm.inquiry_id = res.data.inquiry_info.inquiry_id;\n this.ruleForm.inquiry_items_id = res.data.inquiry_info.id;\n this.getSkulist();\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n getSkulist() {\n console.log('库存匹配');\n this.$http('get', \"/api/sku/list\", {\n brand_id: this.inquiry_info.brand_id,\n goods_name: this.inquiry_info.goods_name,\n 'goods_status/condition': 1,\n goods_status: 1\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n var arr_ = this.tableData,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].goods_id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n checkBind(ids) {\n this.$http('get', \"/api/quote/checkpinlist\", {\n inquiry_items_id: this.$route.query.id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_ids: ids\n }).then(res => {\n if (res.err_code === 0) {\n if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {\n var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON.stringify(this.tableData));\n\n for (var i = 0; i < arr_.length; i++) {\n var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id);\n\n if (res.data.bind_ids.indexOf(str_) != -1) {\n if (this.active == 1) {\n arr_[i].disabled = true;\n this.historyList = arr_;\n } else {\n arr_[i].disabled = true;\n this.tableData = arr_;\n }\n } else {\n if (this.active == 1) {\n arr_[i].disabled = false;\n this.historyList = arr_;\n } else {\n arr_[i].disabled = false;\n this.tableData = arr_;\n }\n }\n }\n }\n }\n });\n },\n\n getHistory() {\n console.log('历史报价');\n this.$http('get', \"/api/quote/history\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.inquiry_info.goods_name,\n brand_name: this.inquiry_info.brand_name,\n inquiry_items_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.total = res.data.total;\n this.historyList = res.data.list || [];\n var arr_ = this.historyList,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getHistory();\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n tab(index) {\n this.active = index;\n console.log(this.active);\n this.page = 1;\n this.$forceUpdate();\n\n if (index == 1) {\n this.getHistory();\n } else {\n this.getSkulist();\n }\n },\n\n dateFormat(row, column) {\n let date = row.create_time;\n return (0, _formate.dateTimeFormate)(date);\n },\n\n keyup(val) {\n if (this.ruleForm.delivery_time_unit == '天') {\n if (val >= 6) {\n this.ruleForm.delivery_time_val = 6;\n }\n\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n } else if (this.ruleForm.delivery_time_unit == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n }\n },\n\n unitChange(val) {\n if (val == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n } else {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n }\n },\n\n currentChange(val) {\n if (val == 1) {\n this.ruleForm.tax_rate = '13%';\n } else if (val == 2) {\n this.ruleForm.tax_rate = '0%';\n }\n },\n\n submitForm(formName) {\n this.$refs[formName].validate(valid => {\n if (this.submitState) {\n return;\n }\n\n if (valid) {\n // let loadingInstance = Loading.service({\n // background: 'rgba(0, 0, 0, 0)'\n // });\n this.submitState = 1;\n let submitData_ = JSON.parse(JSON.stringify(this.ruleForm));\n\n if (submitData_.tax_rate == '13%') {\n submitData_.tax_rate = 0.13;\n } else {\n submitData_.tax_rate = 0;\n }\n\n this.$http('post', \"/api/quote/save\", submitData_).then(res => {\n if (res.err_code == 0) {\n //this.$message('操作成功');\n this.$http('post', \"/api/quote/pin\", {\n inquiry_items_id: this.ruleForm.inquiry_items_id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_id: this.currentDataId\n }).then(res => {\n if (res.err_code == 0) {} else {// this.$message(res.err_msg);\n }\n\n this.$message('操作成功');\n this.getData();\n\n if (this.active == 1) {//历史报价\n //this.getHistory()\n } else {\n //库存匹配\n this.getSkulist();\n }\n\n this.dialogVisible = false; // setTimeout(() => {\n // window.location.reload();\n // }, 2000)\n // loadingInstance.close();\n\n this.submitState = 0;\n });\n } else {\n this.$message(res.err_msg);\n this.submitState = 0; //loadingInstance.close();\n }\n }).catch(err => {\n this.submitState = 0; //loadingInstance.close();\n });\n } else {\n console.log(this.ruleForm.delivery_time);\n return false;\n }\n });\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.ruleForm.brand,\n type: 2\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = []; //this.ruleForm.brand = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n handleSelectBrandName(item) {\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = item.brand_id;\n brand_ss[0].brand_name = item.value;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n },\n\n added() {\n this.title = '新增';\n this.dialogVisible = true;\n this.isModify = false;\n this.ruleForm.brand = '';\n this.ruleForm.tax_rate = '13%';\n this.ruleForm.moq = '';\n this.ruleForm.mpq = '';\n this.ruleForm.price_other = '';\n this.ruleForm.quote_id = '';\n this.$nextTick(() => {\n this.$refs['ruleForm'].resetFields();\n });\n },\n\n modify() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection.length > 1) {\n this.$message(\"请选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3) {\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.title = '修改';\n this.dialogVisible = true;\n this.ruleForm.quote_id = arr.join(\",\");\n this.isModify = true;\n this.$http('get', \"/api/quote/getinfo\", {\n id: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n console.log(res.data.quote_info.tax_rate);\n this.ruleForm.tax_rate = Number(res.data.quote_info.tax_rate) * 100 + '%';\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n this.$message(res.err_msg);\n }\n });\n } else {\n this.$message(\"该订单不可修改\");\n return;\n }\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/quote/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n }).catch(() => {});\n },\n\n handle(index, row) {\n console.log(row);\n\n if (row.disabled) {\n this.$message('已绑定,不能重复操作');\n return;\n }\n\n if (this.active == 1) {\n this.currentDataId = row.id;\n } else {\n this.currentDataId = row.goods_id;\n }\n\n this.title = this.active == 1 ? '确认-历史报价' : '确认-匹配库存';\n this.dialogVisible = true;\n this.ruleForm.quote_id = '';\n this.isModify = true;\n\n if (this.active != 1) {\n //匹配库存 不请求接口\n this.$http('get', \"/api/quote/gettransinfoforsku\", {\n goods_id: row.goods_id,\n inquiry_items_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n var datap_ = res.data.trans_to_quote_info;\n this.ruleForm.goods_name = datap_.goods_name;\n this.ruleForm.batch = datap_.batch;\n this.ruleForm.price_origin = datap_.price_origin;\n this.ruleForm.brand = datap_.brand_name;\n let brand_ssaa = [{\n brand_id: datap_.brand_id,\n brand_name: datap_.brand_name\n }];\n this.ruleForm.brand_s = JSON.stringify(brand_ssaa);\n this.ruleForm.moq = datap_.moq;\n this.ruleForm.mpq = datap_.mpq;\n this.ruleForm.quote_number = datap_.quote_number;\n } else {\n this.$message(res.err_msg);\n }\n });\n } else {\n this.$http('get', \"/api/quote/getinfo\", {\n id: row.id\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n this.ruleForm.tax_rate = res.data.quote_info.tax_rate;\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n this.$message(res.err_msg);\n }\n });\n }\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/inquireDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment